mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.5128: syntax disabled when using synID() in searchpair() skip expr
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)
This commit is contained in:
parent
cdc6a43559
commit
6f0cf62df9
@ -2179,6 +2179,7 @@ win_update(win_T *wp)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef SYN_TIME_LIMIT
|
#ifdef SYN_TIME_LIMIT
|
||||||
// Set the time limit to 'redrawtime'.
|
// Set the time limit to 'redrawtime'.
|
||||||
|
redrawtime_limit_set = TRUE;
|
||||||
init_regexp_timeout(p_rdt);
|
init_regexp_timeout(p_rdt);
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEAT_FOLDING
|
#ifdef FEAT_FOLDING
|
||||||
@ -2692,6 +2693,7 @@ win_update(win_T *wp)
|
|||||||
|
|
||||||
#ifdef SYN_TIME_LIMIT
|
#ifdef SYN_TIME_LIMIT
|
||||||
disable_regexp_timeout();
|
disable_regexp_timeout();
|
||||||
|
redrawtime_limit_set = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Reset the type of redrawing required, the window has been updated.
|
// Reset the type of redrawing required, the window has been updated.
|
||||||
|
@ -1228,6 +1228,10 @@ EXTERN int do_redraw INIT(= FALSE); // extra redraw once
|
|||||||
#ifdef FEAT_DIFF
|
#ifdef FEAT_DIFF
|
||||||
EXTERN int need_diff_redraw INIT(= 0); // need to call diff_redraw()
|
EXTERN int need_diff_redraw INIT(= 0); // need to call diff_redraw()
|
||||||
#endif
|
#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);
|
EXTERN int need_highlight_changed INIT(= TRUE);
|
||||||
|
|
||||||
|
@ -3150,8 +3150,8 @@ syn_regexec(
|
|||||||
colnr_T col,
|
colnr_T col,
|
||||||
syn_time_T *st UNUSED)
|
syn_time_T *st UNUSED)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
int timed_out = FALSE;
|
int timed_out = FALSE;
|
||||||
#ifdef FEAT_PROFILE
|
#ifdef FEAT_PROFILE
|
||||||
proftime_T pt;
|
proftime_T pt;
|
||||||
|
|
||||||
@ -3181,7 +3181,7 @@ syn_regexec(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEAT_RELTIME
|
#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;
|
syn_win->w_s->b_syn_slow = TRUE;
|
||||||
msg(_("'redrawtime' exceeded, syntax highlighting disabled"));
|
msg(_("'redrawtime' exceeded, syntax highlighting disabled"));
|
||||||
|
@ -734,6 +734,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
5128,
|
||||||
/**/
|
/**/
|
||||||
5127,
|
5127,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user