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".
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index a9be36a..8ddf238 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -2640,7 +2640,10 @@
if (tlnum <= 0)
tlnum = 1L;
}
- (void)buflist_new(ffname, sfname, tlnum, BLN_LISTED);
+ // Add BLN_NOCURWIN to avoid a new wininfo items is assocated
+ // with the current window.
+ (void)buflist_new(ffname, sfname, tlnum,
+ BLN_LISTED | BLN_NOCURWIN);
goto theend;
}
buf = buflist_new(ffname, sfname, 0L,