diff options
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r-- | src/nvim/ex_cmds.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 0226499e78..999375b147 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -2116,6 +2116,16 @@ 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; + } + /* * if the file was changed we may not be allowed to abandon it * - if we are going to re-edit the same file |