1
0
forked from aniani/vim

patch 8.0.0339: illegal memory access with vi'

Problem:    Illegal memory access with vi'
Solution:   For quoted text objects bail out if the Visual area spans more
            than one line.
This commit is contained in:
Bram Moolenaar
2017-02-18 23:12:01 +01:00
parent 803452046b
commit 46522af724
3 changed files with 13 additions and 0 deletions

View File

@@ -4357,6 +4357,10 @@ 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();