diff options
-rw-r--r-- | src/drawscreen.c | 2 | ||||
-rw-r--r-- | src/globals.h | 4 | ||||
-rw-r--r-- | src/syntax.c | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 11 insertions, 3 deletions
diff --git a/src/drawscreen.c b/src/drawscreen.c index 2c184bde0..4fea562fc 100644 --- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -2179,6 +2179,7 @@ win_update(win_T *wp) #endif #ifdef SYN_TIME_LIMIT // Set the time limit to 'redrawtime'. + redrawtime_limit_set = TRUE; init_regexp_timeout(p_rdt); #endif #ifdef FEAT_FOLDING @@ -2692,6 +2693,7 @@ win_update(win_T *wp) #ifdef SYN_TIME_LIMIT disable_regexp_timeout(); + redrawtime_limit_set = FALSE; #endif // Reset the type of redrawing required, the window has been updated. diff --git a/src/globals.h b/src/globals.h index 63377af5b..888f6e95d 100644 --- a/src/globals.h +++ b/src/globals.h @@ -1228,6 +1228,10 @@ EXTERN int do_redraw INIT(= FALSE); // extra redraw once #ifdef FEAT_DIFF EXTERN int need_diff_redraw INIT(= 0); // need to call diff_redraw() #endif +#ifdef FEAT_RELTIME +// flag set when 'redrawtime' timeout has been set +EXTERN int redrawtime_limit_set INIT(= FALSE); +#endif EXTERN int need_highlight_changed INIT(= TRUE); diff --git a/src/syntax.c b/src/syntax.c index 679b99d53..c2e83e690 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -3150,8 +3150,8 @@ syn_regexec( colnr_T col, syn_time_T *st UNUSED) { - int r; - int timed_out = FALSE; + int r; + int timed_out = FALSE; #ifdef FEAT_PROFILE proftime_T pt; @@ -3181,7 +3181,7 @@ syn_regexec( } #endif #ifdef FEAT_RELTIME - if (timed_out && !syn_win->w_s->b_syn_slow) + if (timed_out && redrawtime_limit_set && !syn_win->w_s->b_syn_slow) { syn_win->w_s->b_syn_slow = TRUE; msg(_("'redrawtime' exceeded, syntax highlighting disabled")); diff --git a/src/version.c b/src/version.c index 39bbd4d13..75cbbaf2e 100644 --- a/src/version.c +++ b/src/version.c @@ -735,6 +735,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 5128, +/**/ 5127, /**/ 5126, |