To: vim_dev@googlegroups.com Subject: Patch 8.0.1407 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@Moolenaar.net -- 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 ///