diff src/normal.c @ 6961:c2b132add309 v7.4.798

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)
author Bram Moolenaar <bram@vim.org>
date Tue, 28 Jul 2015 11:21:32 +0200
parents 1e621b31948b
children a25618cbc68a
line wrap: on
line diff
--- a/src/normal.c
+++ b/src/normal.c
@@ -9598,18 +9598,23 @@ get_op_vcol(oap, redo_VIsual_vcol, initi
 #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 (initial && *p_sel == 'e' && start >= 1
-			&& start - 1 >= oap->end_vcol)
-	    oap->end_vcol = start - 1;
-	else
-	    oap->end_vcol = end;
-    }
+
+    if (!redo_VIsual_busy)
+    {
+	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)
     {