diff options
author | Bram Moolenaar <Bram@vim.org> | 2004-12-31 20:58:58 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2004-12-31 20:58:58 +0000 |
commit | def9e829de8bcaf723568e5780c47557e83f99f0 (patch) | |
tree | d454cc29b2c6118f26f6911b4dcfcc34847f7b10 /src/search.c | |
parent | dfccaf0f00e8308eae09cb8f012fce3e56097f0f (diff) | |
download | vim-def9e829de8bcaf723568e5780c47557e83f99f0.zip |
updated for version 7.0027
Diffstat (limited to 'src/search.c')
-rw-r--r-- | src/search.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/search.c b/src/search.c index 6a915e170..1d1bc3b31 100644 --- a/src/search.c +++ b/src/search.c @@ -2367,6 +2367,7 @@ findsent(dir, count) int startlnum; int noskip = FALSE; /* do not skip blanks */ int cpo_J; + int found_dot; pos = curwin->w_cursor; if (dir == FORWARD) @@ -2404,9 +2405,17 @@ findsent(dir, count) decl(&pos); /* go back to the previous non-blank char */ + found_dot = FALSE; while ((c = gchar_pos(&pos)) == ' ' || c == '\t' || (dir == BACKWARD && vim_strchr((char_u *)".!?)]\"'", c) != NULL)) { + if (vim_strchr((char_u *)".!?", c) != NULL) + { + /* Only skip over a '.', '!' and '?' once. */ + if (found_dot) + break; + found_dot = TRUE; + } if (decl(&pos) == -1) break; /* when going forward: Stop in front of empty line */ @@ -3315,7 +3324,7 @@ extend: if (start_blank) --ncount; } - if (ncount) + if (ncount > 0) findsent_forward(ncount, TRUE); else decl(&curwin->w_cursor); |