From 9860d14af367be03c9588beb39edf37c16c84375 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 13 Feb 2021 13:34:43 -0500 Subject: 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 --- src/nvim/testdir/test_buffer.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/nvim/testdir/test_buffer.vim') 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 -- cgit From 6855a55d5360b524902b21d1c68077b8aa351768 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 13 Feb 2021 13:41:30 -0500 Subject: vim-patch:8.2.0576: some errors are not covered by tests Problem: Some errors are not covered by tests. Solution: Add a few more tests. (Dominique Pelle, closes vim/vim#5920) https://github.com/vim/vim/commit/067297e16a516838dbc46aaa9d8b1a507afec28d --- src/nvim/testdir/test_buffer.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/nvim/testdir/test_buffer.vim') diff --git a/src/nvim/testdir/test_buffer.vim b/src/nvim/testdir/test_buffer.vim index d4165f0008..99a64694da 100644 --- a/src/nvim/testdir/test_buffer.vim +++ b/src/nvim/testdir/test_buffer.vim @@ -1,5 +1,16 @@ " Tests for Vim buffer +func Test_buffer_error() + new foo1 + new foo2 + + call assert_fails('buffer foo', 'E93:') + call assert_fails('buffer bar', 'E94:') + call assert_fails('buffer 0', 'E939:') + + %bwipe +endfunc + func Test_badd_options() new SomeNewBuffer setlocal cole=3 -- cgit From a2aeed013c131fc98ec135299a2c6f239b1b01eb Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 13 Feb 2021 13:49:42 -0500 Subject: vim-patch:8.2.1903: buffer test fails with normal features Problem: Buffer test fails with normal features. Solution: Use 'numberwidth' instead of 'conceallevel' in the test. https://github.com/vim/vim/commit/37e4e03c67dacfc4a065e95492ffc4c7f490b44b --- src/nvim/testdir/test_buffer.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/testdir/test_buffer.vim') diff --git a/src/nvim/testdir/test_buffer.vim b/src/nvim/testdir/test_buffer.vim index 99a64694da..4de11af6f1 100644 --- a/src/nvim/testdir/test_buffer.vim +++ b/src/nvim/testdir/test_buffer.vim @@ -13,11 +13,11 @@ endfunc func Test_badd_options() new SomeNewBuffer - setlocal cole=3 + setlocal numberwidth=3 wincmd p badd SomeNewBuffer new SomeNewBuffer - call assert_equal(3, &cole) + call assert_equal(3, &numberwidth) close close bwipe! SomeNewBuffer -- cgit From cdace43b6c02ba2125dbcf3ce36d26ac8bb3e219 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 13 Feb 2021 14:05:26 -0500 Subject: vim-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". https://github.com/vim/vim/commit/89b693e5627715cde080c3580c7b641c9bf0c06a --- src/nvim/testdir/test_buffer.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/testdir/test_buffer.vim') diff --git a/src/nvim/testdir/test_buffer.vim b/src/nvim/testdir/test_buffer.vim index 4de11af6f1..40111fdf06 100644 --- a/src/nvim/testdir/test_buffer.vim +++ b/src/nvim/testdir/test_buffer.vim @@ -15,7 +15,7 @@ func Test_badd_options() new SomeNewBuffer setlocal numberwidth=3 wincmd p - badd SomeNewBuffer + badd +1 SomeNewBuffer new SomeNewBuffer call assert_equal(3, &numberwidth) close -- cgit