patch 7.4.1750
Problem: When a buffer gets updated while in command line mode, the screen
may be messed up.
Solution: Postpone the redraw when the screen is scrolled.
diff --git a/src/channel.c b/src/channel.c
index 72484ec..892c09a 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -1431,6 +1431,7 @@
/*
* Invoke the "callback" on channel "channel".
+ * This does not redraw but sets channel_need_redraw;
*/
static void
invoke_callback(channel_T *channel, char_u *callback, partial_T *partial,
@@ -1445,8 +1446,7 @@
call_func(callback, (int)STRLEN(callback),
&rettv, 2, argv, 0L, 0L, &dummy, TRUE, partial, NULL);
clear_tv(&rettv);
-
- redraw_after_callback();
+ channel_need_redraw = TRUE;
}
/*
@@ -2009,6 +2009,10 @@
}
}
+/*
+ * Invoke the callback at "cbhead".
+ * Does not redraw but sets channel_need_redraw.
+ */
static void
invoke_one_time_callback(
channel_T *channel,
@@ -2099,6 +2103,7 @@
/*
* Invoke a callback for "channel"/"part" if needed.
+ * This does not redraw but sets channel_need_redraw when redraw is needed.
* Return TRUE when a message was handled, there might be another one.
*/
static int
@@ -3468,13 +3473,10 @@
}
}
- if (channel_need_redraw && must_redraw)
+ if (channel_need_redraw)
{
channel_need_redraw = FALSE;
- update_screen(0);
- setcursor();
- cursor_on();
- out_flush();
+ redraw_after_callback();
}
return ret;