aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-02-13 14:05:26 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-02-13 14:27:17 -0500
commitcdace43b6c02ba2125dbcf3ce36d26ac8bb3e219 (patch)
treefa9b4989ae4d2db9c7ff93a5a4b31fbfde34a87b /src/nvim/ex_cmds.c
parenta2aeed013c131fc98ec135299a2c6f239b1b01eb (diff)
downloadrneovim-cdace43b6c02ba2125dbcf3ce36d26ac8bb3e219.tar.gz
rneovim-cdace43b6c02ba2125dbcf3ce36d26ac8bb3e219.tar.bz2
rneovim-cdace43b6c02ba2125dbcf3ce36d26ac8bb3e219.zip
vim-patch:8.2.1904: still using default option values after using ":badd +1"
Problem: Still using default option values after using ":badd +1". Solution: Find a window where options were set. Don't set the window when using ":badd". https://github.com/vim/vim/commit/89b693e5627715cde080c3580c7b641c9bf0c06a
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c4
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;
}