aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 999375b147..6205daf0cb 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -2116,14 +2116,12 @@ do_ecmd (
}
}
- // Make re-editing a terminal buffer a no-op
- if (!other_file && curbuf->terminal != NULL) {
- // this is needed for when we are called by do_argfile() and the new
- // argument index becomes the terminal buffer we are already editing
- check_arg_idx(curwin);
- maketitle();
- retval = OK;
- goto theend;
+ // Re-editing a terminal buffer: skip most buffer re-initialization.
+ if (!other_file && curbuf->terminal) {
+ check_arg_idx(curwin); // Needed when called from do_argfile().
+ maketitle(); // Title may show the arg index, e.g. "(2 of 5)".
+ retval = OK;
+ goto theend;
}
/*