From b8c0eeaa30c478c1017ee16919d7cb263e70e8f3 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 17 May 2022 08:16:13 +0800 Subject: vim-patch:8.2.4121: Visual test fails on MS-Windows Problem: Visual test fails on MS-Windows. Solution: Set 'isprint' so that the character used is not printable. https://github.com/vim/vim/commit/262898ae43fa223916cfa27b0de81e5d9f3fc4b0 --- src/nvim/testdir/test_visual.vim | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_visual.vim b/src/nvim/testdir/test_visual.vim index 2b88deb813..42209f8ddd 100644 --- a/src/nvim/testdir/test_visual.vim +++ b/src/nvim/testdir/test_visual.vim @@ -1249,11 +1249,13 @@ endfunc func Test_visual_block_append_invalid_char() " this was going over the end of the line + set isprint=@,161-255 new call setline(1, [' let xxx', 'xxxxxˆ', 'xxxxxxxxxxx']) exe "normal 0\jjA-\" call assert_equal([' - let xxx', 'xxxxx -ˆ', 'xxxxxxxx-xxx'], getline(1, 3)) bwipe! + set isprint& endfunc func Test_visual_reselect_with_count() -- cgit From 26c906f54dafb37f7bc63e136a7a9373d1053fe1 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 17 May 2022 08:07:51 +0800 Subject: vim-patch:8.2.4968: reading past end of the line when C-indenting Problem: Reading past end of the line when C-indenting. Solution: Check for NUL. https://github.com/vim/vim/commit/60ae0e71490c97f2871a6344aca61cacf220f813 --- src/nvim/testdir/test_cindent.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_cindent.vim b/src/nvim/testdir/test_cindent.vim index 4d69aed96c..7ba8ef3397 100644 --- a/src/nvim/testdir/test_cindent.vim +++ b/src/nvim/testdir/test_cindent.vim @@ -5311,6 +5311,13 @@ func Test_cindent_case() bwipe! endfunc +" This was reading past the end of the line +func Test_cindent_check_funcdecl() + new + sil norm o0('\0=L + bwipe! +endfunc + func Test_cindent_scopedecls() new setl cindent ts=4 sw=4 -- cgit From 527e861cbb9c47411c4ba86dbdb9fc79bde47452 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 17 May 2022 08:10:34 +0800 Subject: vim-patch:8.2.4969: changing text in Visual mode may cause invalid memory access Problem: Changing text in Visual mode may cause invalid memory access. Solution: Check the Visual position after making a change. https://github.com/vim/vim/commit/7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97 --- src/nvim/testdir/test_visual.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_visual.vim b/src/nvim/testdir/test_visual.vim index 42209f8ddd..41c29c5bb0 100644 --- a/src/nvim/testdir/test_visual.vim +++ b/src/nvim/testdir/test_visual.vim @@ -1258,6 +1258,16 @@ func Test_visual_block_append_invalid_char() set isprint& endfunc +func Test_visual_block_with_substitute() + " this was reading beyond the end of the line + new + norm a0) + sil! norm  O + s/) + sil! norm  + bwipe! +endfunc + func Test_visual_reselect_with_count() " this was causing an illegal memory access let lines =<< trim END -- cgit