Mercurial > vim
diff src/ex_getln.c @ 11521:578df034735d v8.0.0643
patch 8.0.0643: when a pattern search is slow Vim becomes unusable
commit https://github.com/vim/vim/commit/fbd0b0af6800f6ff89857863d6a07ea03f09ff6c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jun 17 18:44:21 2017 +0200
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 17 Jun 2017 18:45:04 +0200 |
parents | 32aed0993813 |
children | 39787def24bb |
line wrap: on
line diff
--- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -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;