mirror of
https://github.com/neovim/neovim.git
synced 2025-10-11 12:26:37 +00:00
vim-patch:8.2.3428: using freed memory when replacing
Problem: Using freed memory when replacing. (Dhiraj Mishra)
Solution: Get the line pointer after calling ins_copychar().
35a9a00afc
This patch is N/A as it only applies to non-UTF-8 encoding.
This commit is contained in:
@@ -1951,4 +1951,16 @@ func Test_edit_revins()
|
|||||||
bw!
|
bw!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
" Test for getting the character of the line below after "p"
|
||||||
|
func Test_edit_put_CTRL_E()
|
||||||
|
" set encoding=latin1
|
||||||
|
new
|
||||||
|
let @" = ''
|
||||||
|
sil! norm orggRx
|
||||||
|
sil! norm pr
|
||||||
|
call assert_equal(['r', 'r'], getline(1, 2))
|
||||||
|
bwipe!
|
||||||
|
set encoding=utf-8
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
Reference in New Issue
Block a user