Mercurial > vim
changeset 1311:b686fb4898d1 v7.1.025
updated for version 7.1-025
author | vimboss |
---|---|
date | Tue, 10 Jul 2007 11:28:55 +0000 |
parents | a33e606ceea6 |
children | b4b1b5324380 |
files | src/eval.c src/search.c src/version.c |
diffstat | 3 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/eval.c +++ b/src/eval.c @@ -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;
--- a/src/search.c +++ b/src/search.c @@ -573,8 +573,12 @@ searchit(win, buf, pos, dir, pat, count, /* * 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;