Skip to content

Commit

Permalink
updated for version 7.3.760
Browse files Browse the repository at this point in the history
Problem:    dv_ deletes the white space before the line.
Solution:   Move the cursor to the first non-white. (Christian Brabandt)
  • Loading branch information
brammool committed Dec 12, 2012
1 parent 4b166d0 commit 83dadaf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/normal.c
Original file line number Diff line number Diff line change
Expand Up @@ -8628,7 +8628,9 @@ nv_lineop(cap)
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);
Expand Down
6 changes: 5 additions & 1 deletion src/testdir/test19.in
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -16,7 +17,9 @@ r
:" 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

Expand All @@ -27,3 +30,4 @@ test text
a cde
f ghi
test text
Second line beginning with whitespace
1 change: 1 addition & 0 deletions src/testdir/test19.ok
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ test text
test text
{
x
with whitespace
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,8 @@ static char *(features[]) =

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

0 comments on commit 83dadaf

Please sign in to comment.