diff options
author | vimboss <devnull@localhost> | 2007-07-10 11:28:55 +0000 |
---|---|---|
committer | vimboss <devnull@localhost> | 2007-07-10 11:28:55 +0000 |
commit | 41548ad2d896cdacb7e051eacf2ab9a8e8275896 (patch) | |
tree | 1221df8b00aad3ed6ddeafdfaa664f7ee8ce0604 | |
parent | 6ac9ba3b9f95830bdce4415d8705d00129e84137 (diff) | |
download | vim-41548ad2d896cdacb7e051eacf2ab9a8e8275896.tar.gz |
-rw-r--r-- | src/eval.c | 2 | ||||
-rw-r--r-- | src/search.c | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 9 insertions, 1 deletions
@@ -13925,6 +13925,8 @@ search_cmn(argvars, match_pos, flagsp) /* If 'n' flag is used: restore cursor position. */ if (flags & SP_NOMOVE) curwin->w_cursor = save_cursor; + else + curwin->w_set_curswant = TRUE; theend: p_ws = save_p_ws; diff --git a/src/search.c b/src/search.c index 3836db71..ee1aef59 100644 --- a/src/search.c +++ b/src/search.c @@ -573,8 +573,12 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use, stop_lnum) /* * Start searching in current line, unless searching backwards and * we're in column 0. + * If we are searching backwards, in column 0, and not including the + * current position, gain some efficiency by skipping back a line. + * Otherwise begin the search in the current line. */ - if (dir == BACKWARD && start_pos.col == 0) + if (dir == BACKWARD && start_pos.col == 0 + && (options & SEARCH_START) == 0) { lnum = pos->lnum - 1; at_first_line = FALSE; diff --git a/src/version.c b/src/version.c index 4a3f666e..83ff53d9 100644 --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 25, +/**/ 24, /**/ 23, |