vim-patch:8.0.0647: syntax highlighting can make cause a freeze

Problem:    Syntax highlighting can make cause a freeze.
Solution:   Apply 'redrawtime' to syntax highlighting, per window.
06f1ed2f78
This commit is contained in:
Jan Edmund Lazo
2019-04-14 22:34:58 -04:00
parent eada8f5aaa
commit 07a182c6b5
7 changed files with 82 additions and 23 deletions

View File

@@ -5098,8 +5098,6 @@ static int regmatch(
printf("Premature EOL\n");
#endif
}
if (status == RA_FAIL)
got_int = TRUE;
return status == RA_MATCH;
}
@@ -7226,7 +7224,7 @@ static void report_re_switch(char_u *pat)
/// @param nl
///
/// @return TRUE if there is a match, FALSE if not.
static int vim_regexec_both(regmatch_T *rmp, char_u *line, colnr_T col, bool nl)
static int vim_regexec_string(regmatch_T *rmp, char_u *line, colnr_T col, bool nl)
{
regexec_T rex_save;
bool rex_in_use_save = rex_in_use;
@@ -7276,7 +7274,7 @@ int vim_regexec_prog(regprog_T **prog, bool ignore_case, char_u *line,
colnr_T col)
{
regmatch_T regmatch = {.regprog = *prog, .rm_ic = ignore_case};
int r = vim_regexec_both(&regmatch, line, col, false);
int r = vim_regexec_string(&regmatch, line, col, false);
*prog = regmatch.regprog;
return r;
}
@@ -7285,7 +7283,7 @@ int vim_regexec_prog(regprog_T **prog, bool ignore_case, char_u *line,
// Return TRUE if there is a match, FALSE if not.
int vim_regexec(regmatch_T *rmp, char_u *line, colnr_T col)
{
return vim_regexec_both(rmp, line, col, false);
return vim_regexec_string(rmp, line, col, false);
}
// Like vim_regexec(), but consider a "\n" in "line" to be a line break.
@@ -7293,7 +7291,7 @@ int vim_regexec(regmatch_T *rmp, char_u *line, colnr_T col)
// Return TRUE if there is a match, FALSE if not.
int vim_regexec_nl(regmatch_T *rmp, char_u *line, colnr_T col)
{
return vim_regexec_both(rmp, line, col, true);
return vim_regexec_string(rmp, line, col, true);
}
/// Match a regexp against multiple lines.