Mercurial > vim
diff src/regexp.c @ 11529:998d2cf59caa v8.0.0647
patch 8.0.0647: syntax highlighting can make cause a freeze
commit https://github.com/vim/vim/commit/06f1ed2f78c5c03af95054fc3a8665df39dec362
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 18 22:41:03 2017 +0200
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 18 Jun 2017 22:45:04 +0200 |
parents | ac20f71e8aa4 |
children | e769c912fcd9 |
line wrap: on
line diff
--- a/src/regexp.c +++ b/src/regexp.c @@ -5756,8 +5756,6 @@ regmatch( printf("Premature EOL\n"); #endif } - if (status == RA_FAIL) - got_int = TRUE; return (status == RA_MATCH); } @@ -8224,8 +8222,6 @@ report_re_switch(char_u *pat) } #endif -static int vim_regexec_both(regmatch_T *rmp, char_u *line, colnr_T col, int nl); - /* * Match a regexp against a string. * "rmp->regprog" is a compiled regexp as returned by vim_regcomp(). @@ -8236,7 +8232,7 @@ static int vim_regexec_both(regmatch_T * * Return TRUE if there is a match, FALSE if not. */ static int -vim_regexec_both( +vim_regexec_string( regmatch_T *rmp, char_u *line, /* string to match against */ colnr_T col, /* column to start looking for match */ @@ -8299,12 +8295,12 @@ vim_regexec_prog( char_u *line, colnr_T col) { - int r; - regmatch_T regmatch; + int r; + regmatch_T regmatch; regmatch.regprog = *prog; regmatch.rm_ic = ignore_case; - r = vim_regexec_both(®match, line, col, FALSE); + r = vim_regexec_string(®match, line, col, FALSE); *prog = regmatch.regprog; return r; } @@ -8316,7 +8312,7 @@ vim_regexec_prog( 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); } #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \ @@ -8329,7 +8325,7 @@ vim_regexec(regmatch_T *rmp, char_u *lin 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); } #endif