Mercurial > vim
diff src/search.c @ 9:4102fb4ea781 v7.0002
updated for version 7.0002
author | vimboss |
---|---|
date | Sun, 20 Jun 2004 12:51:53 +0000 |
parents | 7edf9b6e4c36 |
children | bdeee1504ac1 |
line wrap: on
line diff
--- a/src/search.c +++ b/src/search.c @@ -3052,13 +3052,16 @@ current_word(oap, count, include, bigwor --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;