0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 7.4.798

Problem:    Repeating a change in Visual mode does not work as expected.
            (Urtica Dioica)
Solution:   Make redo in Visual mode work better. (Christian Brabandt)
This commit is contained in:
Bram Moolenaar
2015-07-28 11:21:32 +02:00
parent 5f95f288a2
commit 31b259bf95
4 changed files with 27 additions and 9 deletions

View File

@@ -9598,18 +9598,23 @@ get_op_vcol(oap, redo_VIsual_vcol, initial)
#endif
getvvcol(curwin, &(oap->start), &oap->start_vcol, NULL, &oap->end_vcol);
getvvcol(curwin, &(oap->end), &start, NULL, &end);
if (start < oap->start_vcol)
oap->start_vcol = start;
if (end > oap->end_vcol)
if (!redo_VIsual_busy)
{
if (initial && *p_sel == 'e' && start >= 1
&& start - 1 >= oap->end_vcol)
oap->end_vcol = start - 1;
else
oap->end_vcol = end;
getvvcol(curwin, &(oap->end), &start, NULL, &end);
if (start < oap->start_vcol)
oap->start_vcol = start;
if (end > oap->end_vcol)
{
if (initial && *p_sel == 'e' && start >= 1
&& start - 1 >= oap->end_vcol)
oap->end_vcol = start - 1;
else
oap->end_vcol = end;
}
}
/* if '$' was used, get oap->end_vcol from longest line */
if (curwin->w_curswant == MAXCOL)
{