diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-12-12 17:33:32 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-12-12 17:33:32 +0100 |
commit | 83dadafdd7967ba2d57b343e24119d6ff17b190c (patch) | |
tree | 19cf9aaed92636cc94ae66c40af6f7f130e33942 | |
parent | 4b166d0a6d06f9a8f2d6f7f3beb5e1edb9a4783c (diff) | |
download | vim-git-83dadafdd7967ba2d57b343e24119d6ff17b190c.tar.gz |
updated for version 7.3.760v7.3.760
Problem: dv_ deletes the white space before the line.
Solution: Move the cursor to the first non-white. (Christian Brabandt)
-rw-r--r-- | src/normal.c | 4 | ||||
-rw-r--r-- | src/testdir/test19.in | 6 | ||||
-rw-r--r-- | src/testdir/test19.ok | 1 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 11 insertions, 2 deletions
diff --git a/src/normal.c b/src/normal.c index d6773697a..869ada37a 100644 --- 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); diff --git a/src/testdir/test19.in b/src/testdir/test19.in index cbb4dd2c2..aafa34e52 100644 --- 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 @@ 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 @@ -27,3 +30,4 @@ test text a cde f ghi test text + Second line beginning with whitespace diff --git a/src/testdir/test19.ok b/src/testdir/test19.ok index 23d51507d..414621491 100644 --- a/src/testdir/test19.ok +++ b/src/testdir/test19.ok @@ -7,3 +7,4 @@ test text test text { x + with whitespace diff --git a/src/version.c b/src/version.c index e743fae50..3f889b6ab 100644 --- a/src/version.c +++ b/src/version.c @@ -726,6 +726,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 760, +/**/ 759, /**/ 758, |