mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 00:18:33 +00:00
vim-patch:8.0.0339: illegal memory access with vi' (#7794)
Problem: Illegal memory access with vi'
Solution: For quoted text objects bail out if the Visual area spans more
than one line.
46522af724
This commit is contained in:

committed by
Justin M. Keyes

parent
907b2f18f7
commit
1d8c612f78
@@ -3669,6 +3669,11 @@ current_quote (
|
||||
|
||||
/* Correct cursor when 'selection' is exclusive */
|
||||
if (VIsual_active) {
|
||||
// this only works within one line
|
||||
if (VIsual.lnum != curwin->w_cursor.lnum) {
|
||||
return false;
|
||||
}
|
||||
|
||||
vis_bef_curs = lt(VIsual, curwin->w_cursor);
|
||||
if (*p_sel == 'e' && vis_bef_curs)
|
||||
dec_cursor();
|
||||
|
@@ -43,3 +43,10 @@ func Test_dotregister_paste()
|
||||
call assert_equal('hello world world', getline(1))
|
||||
q!
|
||||
endfunc
|
||||
|
||||
func Test_Visual_inner_quote()
|
||||
new
|
||||
normal oxX
|
||||
normal vki'
|
||||
bwipe!
|
||||
endfunc
|
||||
|
Reference in New Issue
Block a user