1
0
forked from aniani/vim

patch 8.2.5024: using freed memory with "]d"

Problem:    Using freed memory with "]d".
Solution:   Copy the pattern before searching.
This commit is contained in:
Bram Moolenaar
2022-05-26 16:32:44 +01:00
parent 338f1fc0ee
commit e2fa213cf5
3 changed files with 14 additions and 0 deletions

View File

@@ -1399,6 +1399,12 @@ func Test_define_search()
sil norm o0
sil! norm 
bwipe!
new somefile
call setline(1, ['first line', '', '#define something 0'])
sil norm 0o0
sil! norm ]d
bwipe!
endfunc
" Test for [*, [/, ]* and ]/