]> granicus.if.org Git - vim/commitdiff
patch 8.2.0397: delayed screen update when using undo from Insert mode v8.2.0397
authorBram Moolenaar <Bram@vim.org>
Mon, 16 Mar 2020 21:08:45 +0000 (22:08 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 16 Mar 2020 21:08:45 +0000 (22:08 +0100)
Problem:    Delayed screen update when using undo from Insert mode.
Solution:   Update w_topline and cursor shape before sleeping. (closes #5790)

src/normal.c
src/version.c

index df2cf537e812af94c0d36f84af5b71696337d69c..8ec98e5339199d4283a35bca2fb2abff021f5bf2 100644 (file)
@@ -1154,7 +1154,9 @@ getcount:
 
            kmsg = keep_msg;
            keep_msg = NULL;
-           // showmode() will clear keep_msg, but we want to use it anyway
+           // Showmode() will clear keep_msg, but we want to use it anyway.
+           // First update w_topline.
+           setcursor();
            update_screen(0);
            // now reset it, otherwise it's put in the history again
            keep_msg = kmsg;
@@ -1167,6 +1169,9 @@ getcount:
            }
        }
        setcursor();
+#ifdef CURSOR_SHAPE
+       ui_cursor_shape();              // may show different cursor shape
+#endif
        cursor_on();
        out_flush();
        if (msg_scroll || emsg_on_display)
@@ -1280,7 +1285,7 @@ set_vcount_ca(cmdarg_T *cap, int *set_prevcount)
 #endif
 
 /*
- * Check if  highlighting for visual mode is possible, give a warning message
+ * Check if highlighting for Visual mode is possible, give a warning message
  * if not.
  */
     void
index 51ffb8c57e28443cff22dfbf0d8a28d24838411b..f44ac2f787576a3d78de66715744ec42fc096ffc 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    397,
 /**/
     396,
 /**/