diff src/screen.c @ 12244:d0b039e2ed56 v8.0.1002

patch 8.0.1002: unnecessarily updating screen after timer callback commit https://github.com/vim/vim/commit/02e177d3e85e089ebdfba1a7d937150cffcb287a Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 26 23:43:28 2017 +0200 patch 8.0.1002: unnecessarily updating screen after timer callback Problem: Unnecessarily updating screen after timer callback. Solution: Check if calling the timer sets must_redraw.
author Christian Brabandt <cb@256bit.org>
date Sat, 26 Aug 2017 23:45:04 +0200
parents 69af108df70e
children 1ff5e5dfa9b0
line wrap: on
line diff
--- a/src/screen.c
+++ b/src/screen.c
@@ -445,9 +445,11 @@ redraw_asap(int type)
  * Invoked after an asynchronous callback is called.
  * If an echo command was used the cursor needs to be put back where
  * it belongs. If highlighting was changed a redraw is needed.
+ * If "call_update_screen" is FALSE don't call update_screen() when at the
+ * command line.
  */
     void
-redraw_after_callback(void)
+redraw_after_callback(int call_update_screen)
 {
     ++redrawing_for_callback;
 
@@ -461,7 +463,7 @@ redraw_after_callback(void)
 #ifdef FEAT_WILDMENU
 		&& wild_menu_showing == 0
 #endif
-		)
+		&& call_update_screen)
 	    update_screen(0);
 	/* Redraw in the same position, so that the user can continue
 	 * editing the command. */
@@ -3013,7 +3015,7 @@ win_line(
     int		startrow,
     int		endrow,
     int		nochange UNUSED,	/* not updating for changed text */
-    proftime_T	*syntax_tm)
+    proftime_T	*syntax_tm UNUSED)
 {
     int		col = 0;		/* visual column on screen */
     unsigned	off;			/* offset in ScreenLines/ScreenAttrs */