summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-09-05 22:11:52 +0000
committerBram Moolenaar <Bram@vim.org>2005-09-05 22:11:52 +0000
commit92d640fad1808085ca609aecac8b854a6945d7a6 (patch)
tree4f330884549e69d5cc948ad2d3198f7ce5d7cf2e /src/search.c
parent8b96d64cb57e63f92c335d217d685095ab7c59a7 (diff)
downloadvim-92d640fad1808085ca609aecac8b854a6945d7a6.zip
updated for version 7.0141
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/src/search.c b/src/search.c
index af3215b31..3013d1387 100644
--- a/src/search.c
+++ b/src/search.c
@@ -34,9 +34,6 @@ static void show_pat_in_path __ARGS((char_u *, int,
static void wvsp_one __ARGS((FILE *fp, int idx, char *s, int sc));
#endif
-static char_u *top_bot_msg = (char_u *)N_("search hit TOP, continuing at BOTTOM");
-static char_u *bot_top_msg = (char_u *)N_("search hit BOTTOM, continuing at TOP");
-
/*
* This file contains various searching-related routines. These fall into
* three groups:
@@ -854,17 +851,12 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
* written.
*/
if (dir == BACKWARD) /* start second loop at the other end */
- {
lnum = buf->b_ml.ml_line_count;
- if (!shortmess(SHM_SEARCH) && (options & SEARCH_MSG))
- give_warning((char_u *)_(top_bot_msg), TRUE);
- }
else
- {
lnum = 1;
- if (!shortmess(SHM_SEARCH) && (options & SEARCH_MSG))
- give_warning((char_u *)_(bot_top_msg), TRUE);
- }
+ if (!shortmess(SHM_SEARCH) && (options & SEARCH_MSG))
+ give_warning((char_u *)_(dir == BACKWARD
+ ? top_bot_msg : bot_top_msg), TRUE);
}
if (got_int || called_emsg || break_loop)
break;
@@ -2519,12 +2511,12 @@ found:
* Return TRUE if the next paragraph or section was found.
*/
int
-findpar(oap, dir, count, what, both)
- oparg_T *oap;
- int dir;
- long count;
- int what;
- int both;
+findpar(pincl, dir, count, what, both)
+ int *pincl; /* Return: TRUE if last char is to be included */
+ int dir;
+ long count;
+ int what;
+ int both;
{
linenr_T curr;
int did_skip; /* TRUE after separating lines have been skipped */
@@ -2586,7 +2578,7 @@ findpar(oap, dir, count, what, both)
if ((curwin->w_cursor.col = (colnr_T)STRLEN(ml_get(curr))) != 0)
{
--curwin->w_cursor.col;
- oap->inclusive = TRUE;
+ *pincl = TRUE;
}
}
else