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:
@@ -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 ]/
|
||||
|
||||
Reference in New Issue
Block a user