Problem: Syntax highlighting disabled when using synID() in searchpair()
skip expression and it times out. (Jaehwang Jung)
Solution: Add the redrawtime_limit_set flag. (closes #10562)
#endif
#ifdef SYN_TIME_LIMIT
// Set the time limit to 'redrawtime'.
+ redrawtime_limit_set = TRUE;
init_regexp_timeout(p_rdt);
#endif
#ifdef FEAT_FOLDING
#ifdef SYN_TIME_LIMIT
disable_regexp_timeout();
+ redrawtime_limit_set = FALSE;
#endif
// Reset the type of redrawing required, the window has been updated.
#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);
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;
}
#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"));
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 5128,
/**/
5127,
/**/