Mercurial > vim
changeset 4011:8e54a32bcd56 v7.3.760
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)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 12 Dec 2012 17:33:32 +0100 |
parents | f15a98f9c219 |
children | 6364a9ae1d61 |
files | src/normal.c src/testdir/test19.in src/testdir/test19.ok src/version.c |
diffstat | 4 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/normal.c +++ b/src/normal.c @@ -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);
--- 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 @@ 0wR :" 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 @@ test text a cde f ghi test text + Second line beginning with whitespace