0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.1-236

This commit is contained in:
Bram Moolenaar
2008-01-19 14:59:58 +00:00
parent 4bad6c8d3d
commit 91a4e82243
21 changed files with 154 additions and 44 deletions

View File

@@ -848,11 +848,16 @@ win_update(wp)
cur->hl.buf = buf;
cur->hl.lnum = 0;
cur->hl.first_lnum = 0;
# ifdef FEAT_RELTIME
/* Set the time limit to 'redrawtime'. */
profile_setlimit(p_rdt, &(cur->hl.tm));
# endif
cur = cur->next;
}
search_hl.buf = buf;
search_hl.lnum = 0;
search_hl.first_lnum = 0;
/* time limit is set at the toplevel, for all windows */
#endif
#ifdef FEAT_LINEBREAK
@@ -6462,6 +6467,10 @@ start_search_hl()
{
last_pat_prog(&search_hl.rm);
search_hl.attr = hl_attr(HLF_L);
# ifdef FEAT_RELTIME
/* Set the time limit to 'redrawtime'. */
profile_setlimit(p_rdt, &search_hl.tm);
# endif
}
}
@@ -6587,6 +6596,14 @@ next_search_hl(win, shl, lnum, mincol)
called_emsg = FALSE;
for (;;)
{
#ifdef FEAT_RELTIME
/* Stop searching after passing the time limit. */
if (profile_passed_limit(&(shl->tm)))
{
shl->lnum = 0; /* no match found in time */
break;
}
#endif
/* Three situations:
* 1. No useful previous match: search from start of line.
* 2. Not Vi compatible or empty match: continue at next character.
@@ -6620,7 +6637,13 @@ next_search_hl(win, shl, lnum, mincol)
matchcol = shl->rm.endpos[0].col;
shl->lnum = lnum;
nmatched = vim_regexec_multi(&shl->rm, win, shl->buf, lnum, matchcol);
nmatched = vim_regexec_multi(&shl->rm, win, shl->buf, lnum, matchcol,
#ifdef FEAT_RELTIME
&(shl->tm)
#else
NULL
#endif
);
if (called_emsg)
{
/* Error while handling regexp: stop using this regexp. */