diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-05-16 19:40:59 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-16 19:40:59 +0100 |
commit | 7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97 (patch) | |
tree | d40856d0b0eb3723b94a0543db98cd8d96cb2d50 /src/testdir | |
parent | 60ae0e71490c97f2871a6344aca61cacf220f813 (diff) | |
download | vim-git-7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97.tar.gz |
patch 8.2.4969: changing text in Visual mode may cause invalid memory accessv8.2.4969
Problem: Changing text in Visual mode may cause invalid memory access.
Solution: Check the Visual position after making a change.
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_visual.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim index abc8265bd..c3230623b 100644 --- a/src/testdir/test_visual.vim +++ b/src/testdir/test_visual.vim @@ -1296,6 +1296,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 |