summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-05-16 19:40:59 +0100
committerBram Moolenaar <Bram@vim.org>2022-05-16 19:40:59 +0100
commit7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97 (patch)
treed40856d0b0eb3723b94a0543db98cd8d96cb2d50 /src/testdir
parent60ae0e71490c97f2871a6344aca61cacf220f813 (diff)
downloadvim-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.vim10
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