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".
89b693e562
This commit is contained in:
Jan Edmund Lazo
2021-02-13 14:05:26 -05:00
parent a2aeed013c
commit cdace43b6c
4 changed files with 37 additions and 22 deletions

View File

@@ -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;
}