0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.2.3949: using freed memory with /\%V

Problem:    Using freed memory with /\%V.
Solution:   Get the line again after getvvcol().
This commit is contained in:
Bram Moolenaar
2021-12-30 14:49:43 +00:00
parent cfe3af284a
commit 4c13e5e676
3 changed files with 17 additions and 2 deletions

View File

@@ -1045,4 +1045,12 @@ func Test_using_mark_position()
bwipe!
endfunc
func Test_using_visual_position()
" this was using freed memory
new
exe "norm 0o\<Esc>\<C-V>k\<C-X>o0"
/\%V
bwipe!
endfunc
" vim: shiftwidth=2 sts=2 expandtab