diff options
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r-- | src/nvim/ex_cmds.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index bf9fc6f187..b220b034dd 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -2333,8 +2333,10 @@ int do_ecmd( if (tlnum <= 0) tlnum = 1L; } + // Add BLN_NOCURWIN to avoid a new wininfo items are associated + // with the current window. const buf_T *const newbuf - = buflist_new(ffname, sfname, tlnum, BLN_LISTED); + = buflist_new(ffname, sfname, tlnum, BLN_LISTED | BLN_NOCURWIN); if (newbuf != NULL && (flags & ECMD_ALTBUF)) { curwin->w_alt_fnum = newbuf->b_fnum; } |