On So, 09 Dez 2012, Christian Brabandt wrote:
> On Sa, 08 Dez 2012, Bram Moolenaar wrote:
> > Thanks.  It's probably not difficult to add a test for this...
> 
> Yeah, I thought about this, after I sent the mail. Anyways, here is the 
> patch including a test.

Sorry, small error in the testfile. Here is the correct patch.


regards,
Christian
-- 
Demokratie ist eine Form der Regierung bei der durch die Wahl einer
inkompetenten Masse eine korrupte Minderheit ernannt wird.
                -- George Bernard Shaw

-- 
You received this message from the "vim_use" 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
diff --git a/src/normal.c b/src/normal.c
--- a/src/normal.c
+++ b/src/normal.c
@@ -8628,7 +8628,9 @@
     cap->oap->motion_type = MLINE;
     if (cursor_down(cap->count1 - 1L, cap->oap->op_type == OP_NOP) == FAIL)
 	clearopbeep(cap->oap);
-    else if (  cap->oap->op_type == OP_DELETE
+    else if (  ( cap->oap->op_type == OP_DELETE /* only with linwise motions */
+		&& cap->oap->motion_force != 'v'
+		&& cap->oap->motion_force != Ctrl_V)
 	    || cap->oap->op_type == OP_LSHIFT
 	    || cap->oap->op_type == OP_RSHIFT)
 	beginline(BL_SOL | BL_FIX);
diff --git a/src/testdir/test19.in b/src/testdir/test19.in
--- a/src/testdir/test19.in
+++ b/src/testdir/test19.in
@@ -1,4 +1,5 @@
 Tests for "r<Tab>" with 'smarttab' and 'expandtab' set/not set.
+Also test that dv_ works correctly
 
 STARTTEST
 :so small.vim
@@ -16,7 +17,9 @@
 :" Test that copyindent works with expandtab set
 :set expandtab smartindent copyindent ts=8 sw=8 sts=8
 o{
-x:?^start?,$w! test.out
+x:set nosol
+/Second line/
+fwdv_:?^start?,$w! test.out
 :qa!
 ENDTEST
 
@@ -27,3 +30,4 @@
     a cde
     f ghi
 test text
+  Second line beginning with whitespace
diff --git a/src/testdir/test19.ok b/src/testdir/test19.ok
--- a/src/testdir/test19.ok
+++ b/src/testdir/test19.ok
@@ -7,3 +7,4 @@
 test text
 {
         x
+  with whitespace

Reply via email to