summaryrefslogtreecommitdiff
path: root/src/normal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-07-28 11:21:32 +0200
committerBram Moolenaar <Bram@vim.org>2015-07-28 11:21:32 +0200
commit31b259bf9571cae6408be3ef75d9485e24029be5 (patch)
treec4af83ad0c9d6cc0ea766f5d0641136ba091ef99 /src/normal.c
parent5f95f288a2d303be1571e818655fd90e399ee58e (diff)
downloadvim-31b259bf9571cae6408be3ef75d9485e24029be5.zip
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)
Diffstat (limited to 'src/normal.c')
-rw-r--r--src/normal.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/normal.c b/src/normal.c
index 599b12ac1..51aaeccb4 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -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)
{