Patch 8.0.1407
Problem:    GUI: CursorHold may trigger before 'updatetime' when using timers.
Solution:   Check that 'updatetime' has passed.
Files:      src/gui.c


*** ../vim-8.0.1406/src/gui.c   2017-12-18 18:14:43.451768484 +0100
--- src/gui.c   2017-12-19 09:53:17.525876848 +0100
***************
*** 2923,2928 ****
--- 2923,2931 ----
  gui_wait_for_chars(long wtime, int tb_change_cnt)
  {
      int           retval;
+ #if defined(ELAPSED_FUNC) && defined(FEAT_AUTOCMD)
+     ELAPSED_TYPE start_tv;
+ #endif
  
  #ifdef FEAT_MENU
      /*
***************
*** 2952,2957 ****
--- 2955,2964 ----
        return retval;
      }
  
+ #if defined(ELAPSED_FUNC) && defined(FEAT_AUTOCMD)
+     ELAPSED_INIT(start_tv);
+ #endif
+ 
      /*
       * While we are waiting indefinitely for a character, blink the cursor.
       */
***************
*** 2966,2972 ****
      if (gui_wait_for_chars_or_timer(p_ut) == OK)
        retval = OK;
  #ifdef FEAT_AUTOCMD
!     else if (trigger_cursorhold() && typebuf.tb_change_cnt == tb_change_cnt)
      {
        char_u  buf[3];
  
--- 2973,2983 ----
      if (gui_wait_for_chars_or_timer(p_ut) == OK)
        retval = OK;
  #ifdef FEAT_AUTOCMD
!     else if (trigger_cursorhold()
! # ifdef ELAPSED_FUNC
!           && ELAPSED_FUNC(start_tv) >= p_ut
! # endif
!           && typebuf.tb_change_cnt == tb_change_cnt)
      {
        char_u  buf[3];
  
*** ../vim-8.0.1406/src/version.c       2017-12-18 19:48:34.809669484 +0100
--- src/version.c       2017-12-19 09:52:17.482397120 +0100
***************
*** 773,774 ****
--- 773,776 ----
  {   /* Add new patch number below this line */
+ /**/
+     1407,
  /**/

-- 
The difference between theory and practice, is that in theory, there
is no difference between theory and practice.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui