diff src/ex_cmds.c @ 22711:92f221ad267c v8.2.1904

patch 8.2.1904: still using default option values after using ":badd +1" Commit: https://github.com/vim/vim/commit/89b693e5627715cde080c3580c7b641c9bf0c06a Author: Bram Moolenaar <Bram@vim.org> Date: Sun Oct 25 17:09:50 2020 +0100 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".
author Bram Moolenaar <Bram@vim.org>
date Sun, 25 Oct 2020 17:15:03 +0100
parents 9ff187b1652e
children 3e4981de5636
line wrap: on
line diff
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -2640,7 +2640,10 @@ do_ecmd(
 		    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,