summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-10-25 15:02:51 +0100
committerBram Moolenaar <Bram@vim.org>2020-10-25 15:02:51 +0100
commite974fa7b2b98e53a59d5ef16a6a1291f12a32e33 (patch)
tree2416e778e2218070a1fdf1bca3c9310df4d2865a /src/ex_cmds.c
parent4ff2f2fb6bef01a06bd726bae8dfa8dd6355d594 (diff)
patch 8.2.1902: default option values changed with :badd for existing bufferv8.2.1902
Problem: Default option values are changed when using :badd for an existing buffer. Solution: When calling buflist_new() pass a zero line number. (closes #7195)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 82e9c577af..a9be36a0c9 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -2630,7 +2630,9 @@ do_ecmd(
{
if (flags & ECMD_ADDBUF)
{
- linenr_T tlnum = 1L;
+ // Default the line number to zero to avoid that a wininfo item
+ // is added for the current window.
+ linenr_T tlnum = 0;
if (command != NULL)
{