diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-05-17 08:47:45 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-17 08:47:45 +0800 |
| commit | 6613f58cebde7db4e69709b84d511c32a7c4ce32 (patch) | |
| tree | 55b36c6b2f52b6f192fdbe36d47bb0469473bede /src/nvim/testdir | |
| parent | 07ade91f217a0ed307ca87b4391d803ec0ab61cb (diff) | |
| parent | 527e861cbb9c47411c4ba86dbdb9fc79bde47452 (diff) | |
| download | rneovim-6613f58cebde7db4e69709b84d511c32a7c4ce32.tar.gz rneovim-6613f58cebde7db4e69709b84d511c32a7c4ce32.tar.bz2 rneovim-6613f58cebde7db4e69709b84d511c32a7c4ce32.zip | |
Merge pull request #18598 from zeertzjq/vim-8.2.4968
vim-patch:8.2.{4121,4968,4969}: invalid memory access
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_cindent.vim | 7 | ||||
| -rw-r--r-- | src/nvim/testdir/test_visual.vim | 12 |
2 files changed, 19 insertions, 0 deletions
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 diff --git a/src/nvim/testdir/test_visual.vim b/src/nvim/testdir/test_visual.vim index 2b88deb813..41c29c5bb0 100644 --- a/src/nvim/testdir/test_visual.vim +++ b/src/nvim/testdir/test_visual.vim @@ -1249,11 +1249,23 @@ 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\<C-V>jjA-\<Esc>" call assert_equal([' - let xxx', 'xxxxx -', 'xxxxxxxx-xxx'], getline(1, 3)) bwipe! + 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() |