mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 17:28:23 +00:00
inccommand: improve performance #6949
During a preview, we can stop looking for matches after we got enough lines for the preview buffer. Because of this perf improvement, the 'redrawtime' test needs to be slowed down in a different way: _long_ lines instead of just many lines.
This commit is contained in:

committed by
Justin M. Keyes

parent
0fb4d173f8
commit
619838f85d
@@ -3332,7 +3332,8 @@ static buf_T *do_sub(exarg_T *eap, proftime_T timeout)
|
||||
// Check for a match on each line.
|
||||
linenr_T line2 = eap->line2;
|
||||
for (linenr_T lnum = eap->line1;
|
||||
lnum <= line2 && !(got_quit || aborting());
|
||||
lnum <= line2 && !(got_quit || aborting())
|
||||
&& (!preview || matched_lines.size <= (size_t)p_cwh);
|
||||
lnum++) {
|
||||
long nmatch = vim_regexec_multi(®match, curwin, curbuf, lnum,
|
||||
(colnr_T)0, NULL);
|
||||
|
Reference in New Issue
Block a user