Patch 7.4.408 introduced a regression when virtualedit is set to block
or all and a block append is performed in the middle of a tab.

For example, with "set ve=all" and the following two lines

1       1
2       2

run "3|<C-v>jAx".  This will result in

1  x     1
2x      2

rather than this

1  x     1
2  x     2

as was the behavior before 7.4.408.  The attached patch fixes this and
adds a test for it.

Cheers,
-- 
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <james...@jamessan.com>

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff -r 8cae3b61ce9e src/ops.c
--- a/src/ops.c
+++ b/src/ops.c
@@ -623,8 +623,8 @@
 	    {
 		int off = (*mb_off_next)(oldp, oldp + offset);
 		offset += off;
-		spaces = 0;
-		count = 0;
+		spaces -= off;
+		count -= off;
 	    }
 	}
 #endif
diff -r 8cae3b61ce9e src/testdir/test39.in
--- a/src/testdir/test39.in
+++ b/src/testdir/test39.in
@@ -44,6 +44,11 @@
 :exe ":norm! 07l\<C-V>jjIx\<Esc>"
 :set ve=
 :.,/^$/w >> test.out
+:" Test for Visual block append when virtualedit=all
+:set ve=all
+:exe ":norm! 012l\<C-v>jjAx\<Esc>"
+:set ve=
+:.,/^$/w >> test.out
 :" gUe must uppercase a whole word, also when ß changes to SS
 Gothe youtußeuu endYpk0wgUe
 :" gUfx must uppercase until x, inclusive.
diff -r 8cae3b61ce9e src/testdir/test39.ok
--- a/src/testdir/test39.ok
+++ b/src/testdir/test39.ok
@@ -26,6 +26,10 @@
        x 	line2
        x 	line3
 
+       x     x   line1
+       x     x   line2
+       x     x   line3
+
 the YOUTUSSEUU end
 - yOUSSTUSSEXu -
 THE YOUTUSSEUU END

Raspunde prin e-mail lui