1
0
forked from aniani/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.
This commit is contained in:
Bram Moolenaar
2022-05-16 19:40:59 +01:00
parent 60ae0e7149
commit 7ce5b2b590
6 changed files with 44 additions and 11 deletions

View File

@@ -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