mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.0.0643: when a pattern search is slow Vim becomes unusable
Problem: When 'hlsearch' is set and matching with the last search pattern is very slow, Vim becomes unusable. Cannot quit search by pressing CTRL-C. Solution: When the search times out set a flag and don't try again. Check for timeout and CTRL-C in NFA loop that adds states.
This commit is contained in:
@@ -1693,7 +1693,7 @@ getcmdline(
|
||||
i = searchit(curwin, curbuf, &t,
|
||||
c == Ctrl_G ? FORWARD : BACKWARD,
|
||||
ccline.cmdbuff, count, search_flags,
|
||||
RE_SEARCH, 0, NULL);
|
||||
RE_SEARCH, 0, NULL, NULL);
|
||||
--emsg_off;
|
||||
if (i)
|
||||
{
|
||||
@@ -1903,9 +1903,9 @@ cmdline_changed:
|
||||
i = do_search(NULL, firstc, ccline.cmdbuff, count,
|
||||
SEARCH_KEEP + SEARCH_OPT + SEARCH_NOOF + SEARCH_PEEK,
|
||||
#ifdef FEAT_RELTIME
|
||||
&tm
|
||||
&tm, NULL
|
||||
#else
|
||||
NULL
|
||||
NULL, NULL
|
||||
#endif
|
||||
);
|
||||
--emsg_off;
|
||||
|
Reference in New Issue
Block a user