Patch 8.2.5128
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)
Files:      src/globals.h, src/drawscreen.c, src/syntax.c


*** ../vim-8.2.5127/src/globals.h       2022-06-14 13:30:31.640876084 +0100
--- src/globals.h       2022-06-19 12:17:14.983064400 +0100
***************
*** 1228,1233 ****
--- 1228,1237 ----
  #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);
  
*** ../vim-8.2.5127/src/drawscreen.c    2022-06-05 16:55:50.694774344 +0100
--- src/drawscreen.c    2022-06-19 12:13:15.011459278 +0100
***************
*** 2179,2184 ****
--- 2179,2185 ----
  #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,2697 ****
--- 2693,2699 ----
  
  #ifdef SYN_TIME_LIMIT
      disable_regexp_timeout();
+     redrawtime_limit_set = FALSE;
  #endif
  
      // Reset the type of redrawing required, the window has been updated.
*** ../vim-8.2.5127/src/syntax.c        2022-06-05 16:55:50.702774344 +0100
--- src/syntax.c        2022-06-19 12:25:47.088228386 +0100
***************
*** 3150,3157 ****
      colnr_T   col,
      syn_time_T  *st UNUSED)
  {
!     int r;
!     int timed_out = FALSE;
  #ifdef FEAT_PROFILE
      proftime_T        pt;
  
--- 3150,3157 ----
      colnr_T   col,
      syn_time_T  *st UNUSED)
  {
!     int               r;
!     int               timed_out = FALSE;
  #ifdef FEAT_PROFILE
      proftime_T        pt;
  
***************
*** 3181,3187 ****
      }
  #endif
  #ifdef FEAT_RELTIME
!     if (timed_out && !syn_win->w_s->b_syn_slow)
      {
        syn_win->w_s->b_syn_slow = TRUE;
        msg(_("'redrawtime' exceeded, syntax highlighting disabled"));
--- 3181,3187 ----
      }
  #endif
  #ifdef FEAT_RELTIME
!     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"));
*** ../vim-8.2.5127/src/version.c       2022-06-19 11:45:42.654832438 +0100
--- src/version.c       2022-06-19 12:27:18.308346277 +0100
***************
*** 736,737 ****
--- 736,739 ----
  {   /* Add new patch number below this line */
+ /**/
+     5128,
  /**/

-- 
OLD WOMAN: King of the WHO?
ARTHUR:    The Britons.
OLD WOMAN: Who are the Britons?
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220619112811.DF94D1C075E%40moolenaar.net.

Raspunde prin e-mail lui