aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_buffer.vim
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-02-13 13:34:43 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-02-13 13:40:09 -0500
commit9860d14af367be03c9588beb39edf37c16c84375 (patch)
tree62187163be15b3445b779b2356dfea382f63dc79 /src/nvim/testdir/test_buffer.vim
parent5ad32885d461e8ace052397b251f25fae24189a3 (diff)
downloadrneovim-9860d14af367be03c9588beb39edf37c16c84375.tar.gz
rneovim-9860d14af367be03c9588beb39edf37c16c84375.tar.bz2
rneovim-9860d14af367be03c9588beb39edf37c16c84375.zip
vim-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 vim/vim#7195) https://github.com/vim/vim/commit/e974fa7b2b98e53a59d5ef16a6a1291f12a32e33
Diffstat (limited to 'src/nvim/testdir/test_buffer.vim')
-rw-r--r--src/nvim/testdir/test_buffer.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_buffer.vim b/src/nvim/testdir/test_buffer.vim
index f455b6911f..d4165f0008 100644
--- a/src/nvim/testdir/test_buffer.vim
+++ b/src/nvim/testdir/test_buffer.vim
@@ -1,5 +1,17 @@
" Tests for Vim buffer
+func Test_badd_options()
+ new SomeNewBuffer
+ setlocal cole=3
+ wincmd p
+ badd SomeNewBuffer
+ new SomeNewBuffer
+ call assert_equal(3, &cole)
+ close
+ close
+ bwipe! SomeNewBuffer
+endfunc
+
func Test_balt()
new SomeNewBuffer
balt +3 OtherBuffer