Commits

Bram Moolenaar  committed 8e54a32

updated for version 7.3.760
Problem: dv_ deletes the white space before the line.
Solution: Move the cursor to the first non-white. (Christian Brabandt)

  • Participants
  • Parent commits f15a98f
  • Tags v7-3-760

Comments (0)

Files changed (4)

File src/normal.c

     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 linewise 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);

File src/testdir/test19.in

 Tests for "r<Tab>" with 'smarttab' and 'expandtab' set/not set.
+Also test that dv_ works correctly
 
 STARTTEST
 :so small.vim
 :" 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
 
     a cde
     f ghi
 test text
+  Second line beginning with whitespace

File src/testdir/test19.ok

 test text
 {
         x
+  with whitespace

File src/version.c

 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    760,
+/**/
     759,
 /**/
     758,