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.
diff --git a/src/screen.c b/src/screen.c
index 54ba957..b576214 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -445,9 +445,11 @@
* 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 @@
#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 @@
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 */