summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2004-06-20 12:51:53 +0000
committerBram Moolenaar <Bram@vim.org>2004-06-20 12:51:53 +0000
commit69a7cb473ceae109b61fae9aa04ee0c29afba5d9 (patch)
tree04bd3292cc6c2317842d7a46ae3ab11e9956ed99 /src/search.c
parented20346f0b81d1d89c22c9616abe8e47b4c17f08 (diff)
downloadvim-git-69a7cb473ceae109b61fae9aa04ee0c29afba5d9.tar.gz
updated for version 7.0002v7.0002
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/search.c b/src/search.c
index 9c6cc6dc1..ace8fa83c 100644
--- a/src/search.c
+++ b/src/search.c
@@ -3052,13 +3052,16 @@ current_word(oap, count, include, bigword)
--count;
}
- if (include_white && cls() != 0)
+ if (include_white && (cls() != 0
+ || (curwin->w_cursor.col == 0 && !inclusive)))
{
/*
* If we don't include white space at the end, move the start
* to include some white space there. This makes "daw" work
* better on the last word in a sentence (and "2daw" on last-but-one
- * word). But don't delete white space at start of line (indent).
+ * word). Also when "2daw" deletes "word." at the end of the line
+ * (cursor is at start of next line).
+ * But don't delete white space at start of line (indent).
*/
pos = curwin->w_cursor; /* save cursor position */
curwin->w_cursor = start_pos;