comparison src/ex_cmds.c @ 22707:9ff187b1652e v8.2.1902

patch 8.2.1902: default option values changed with :badd for existing buffer Commit: https://github.com/vim/vim/commit/e974fa7b2b98e53a59d5ef16a6a1291f12a32e33 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Oct 25 15:02:51 2020 +0100 patch 8.2.1902: default option values changed with :badd for existing buffer 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)
author Bram Moolenaar <Bram@vim.org>
date Sun, 25 Oct 2020 15:15:03 +0100
parents 1c31afe1f43f
children 92f221ad267c
comparison
equal deleted inserted replaced
22706:9087acfe9333 22707:9ff187b1652e
2628 buf = buflist_findnr(fnum); 2628 buf = buflist_findnr(fnum);
2629 else 2629 else
2630 { 2630 {
2631 if (flags & ECMD_ADDBUF) 2631 if (flags & ECMD_ADDBUF)
2632 { 2632 {
2633 linenr_T tlnum = 1L; 2633 // Default the line number to zero to avoid that a wininfo item
2634 // is added for the current window.
2635 linenr_T tlnum = 0;
2634 2636
2635 if (command != NULL) 2637 if (command != NULL)
2636 { 2638 {
2637 tlnum = atol((char *)command); 2639 tlnum = atol((char *)command);
2638 if (tlnum <= 0) 2640 if (tlnum <= 0)