* are still available. But when those available characters
* are part of a mapping, and we are going to do a blocking
* wait here. Need to update the screen to display the
- * changed text so far. */
- if ((State & INSERT) && advance && must_redraw != 0)
+ * changed text so far. Also for when 'lazyredraw' is set and
+ * redrawing was postponed because there was something in the
+ * input buffer (e.g., termresponse). */
+ if (((State & INSERT) || p_lz) && advance && must_redraw != 0)
{
update_screen(0);
setcursor(); /* put cursor back where it belongs */
continue;
if (n == KEYLEN_REMOVED) /* key code removed */
+ {
+ if (must_redraw)
+ {
+ /* Redrawing was postponed, do it now. */
+ update_screen(0);
+ setcursor(); /* put cursor back where it belongs */
+ }
continue;
+ }
if (n > 0) /* found a termcode: adjust length */
len = n;
if (len == 0) /* nothing typed yet */