Hi Urtica!

On Sa, 11 Jul 2015, Urtica dioica wrote:

> This patch caused a regression. Here's the behavior in 7.4.752:
> 
> aaa
> aaa
> a
> --- <C-V>G~e.
> AaA
> AaA
> A
> 
> Same keys in 7.4.753:
> 
> aaa
> aaa
> a
> --- <C-V>G~e.
> AAa
> AAa
> A
> 
> Using $ to put the cursor visually in the same spot, a different result:
> 
> aaa
> aaa
> a
> --- <C-V>G~$.
> AAA
> AAA
> A
> 
> With ve=all however, $ gives the same result as e.

Found the problem. Attached patch fixes it.


Best,
Christian
-- 
Der Computer ist die logische Weiterentwicklung des Menschen:
Intelligenz ohne Moral.
                -- John Osborne

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/normal.c b/src/normal.c
--- 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)
     {
diff --git a/src/testdir/test_listlbr.in b/src/testdir/test_listlbr.in
--- a/src/testdir/test_listlbr.in
+++ b/src/testdir/test_listlbr.in
@@ -74,6 +74,12 @@ Golong line: 40afoobar aTARGET at end
 :let g:test ="Test 8: set linebreak with visual char mode and changing block"
 :$put =g:test
 Go1111-1111-1111-11-1111-1111-11110f-lv3lc2222bgj.
+:let g:test ="Test 9: using redo after block visual mode"
+:$put =g:test
+Go
+aaa
+aaa
+a2k2j~e.
 :%w! test.out
 :qa!
 ENDTEST
diff --git a/src/testdir/test_listlbr.ok b/src/testdir/test_listlbr.ok
--- a/src/testdir/test_listlbr.ok
+++ b/src/testdir/test_listlbr.ok
@@ -41,3 +41,8 @@ Test 7: set linebreak with visual block 
 long line: foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar TARGETx at end
 Test 8: set linebreak with visual char mode and changing block
 1111-2222-1111-11-1111-2222-1111
+Test 9: using redo after block visual mode
+
+AaA
+AaA
+A

Raspunde prin e-mail lui