Patch 8.2.5129
Problem:    Timeout handling is not optimal.
Solution:   Avoid setting timeout_flag twice.  Adjust the pointer when
            stopping the regexp timeout.  Adjust variable name.
Files:      src/os_unix.c, src/os_win32.c, src/regexp.c


*** ../vim-8.2.5128/src/os_unix.c       2022-06-17 15:17:06.304400375 +0100
--- src/os_unix.c       2022-06-19 14:22:40.882913187 +0100
***************
*** 8307,8313 ****
      // This is really the caller's responsibility, but let's make sure the
      // previous timer has been stopped.
      stop_timeout();
-     timeout_flag = FALSE;
  
      if (!timer_created)
      {
--- 8307,8312 ----
*** ../vim-8.2.5128/src/os_win32.c      2022-06-18 16:48:32.762559984 +0100
--- src/os_win32.c      2022-06-19 14:25:36.426629194 +0100
***************
*** 8335,8341 ****
   * timeouts.
   */
  static int      timeout_flags[2];
! static int      flag_idx = 0;
  static int      *timeout_flag = &timeout_flags[0];
  
  
--- 8335,8341 ----
   * timeouts.
   */
  static int      timeout_flags[2];
! static int      timeout_flag_idx = 0;
  static int      *timeout_flag = &timeout_flags[0];
  
  
***************
*** 8383,8389 ****
  {
      BOOL ret;
  
!     timeout_flag = &timeout_flags[flag_idx];
  
      stop_timeout();
      ret = CreateTimerQueueTimer(
--- 8383,8389 ----
  {
      BOOL ret;
  
!     timeout_flag = &timeout_flags[timeout_flag_idx];
  
      stop_timeout();
      ret = CreateTimerQueueTimer(
***************
*** 8395,8401 ****
      }
      else
      {
!       flag_idx = (flag_idx + 1) % 2;
        timer_active = TRUE;
        *timeout_flag = FALSE;
      }
--- 8395,8401 ----
      }
      else
      {
!       timeout_flag_idx = (timeout_flag_idx + 1) % 2;
        timer_active = TRUE;
        *timeout_flag = FALSE;
      }
*** ../vim-8.2.5128/src/regexp.c        2022-06-17 15:17:06.304400375 +0100
--- src/regexp.c        2022-06-19 14:26:11.826574420 +0100
***************
*** 61,66 ****
--- 61,67 ----
  disable_regexp_timeout(void)
  {
      stop_timeout();
+     timeout_flag = &dummy_timeout_flag;
  }
  #endif
  
*** ../vim-8.2.5128/src/version.c       2022-06-19 12:27:41.524371408 +0100
--- src/version.c       2022-06-19 14:35:21.930020898 +0100
***************
*** 736,737 ****
--- 736,739 ----
  {   /* Add new patch number below this line */
+ /**/
+     5129,
  /**/

-- 
ARTHUR:    Be quiet!  I order you to shut up.
OLD WOMAN: Order, eh -- who does he think he is?
ARTHUR:    I am your king!
OLD WOMAN: Well, I didn't vote for you.
                 "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/20220619133731.531C81C075E%40moolenaar.net.

Raspunde prin e-mail lui