diff --git a/src/search.c b/src/search.c index 6e62184d40..83c584272c 100644 --- a/src/search.c +++ b/src/search.c @@ -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(); diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim index 9d093d34e3..227da87f83 100644 --- a/src/testdir/test_visual.vim +++ b/src/testdir/test_visual.vim @@ -43,3 +43,10 @@ func Test_Visual_vapo() normal vapo bwipe! endfunc + +func Test_Visual_inner_quote() + new + normal oxX + normal vki' + bwipe! +endfunc diff --git a/src/version.c b/src/version.c index aac6dae678..41a0321edb 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 339, /**/ 338, /**/