# HG changeset patch # User Bram Moolenaar # Date 1584393304 -3600 # Node ID e21c22c58e2ba33f2a6b820f56fd5f3704febec8 # Parent 842f0a26377d472c59a252e1dcfedd7716cf1be0 patch 8.2.0397: delayed screen update when using undo from Insert mode Commit: https://github.com/vim/vim/commit/5715b3147bfc8ddfe905339f6fd224fd3a5a3ba1 Author: Bram Moolenaar Date: Mon Mar 16 22:08:45 2020 +0100 patch 8.2.0397: delayed screen update when using undo from Insert mode Problem: Delayed screen update when using undo from Insert mode. Solution: Update w_topline and cursor shape before sleeping. (closes https://github.com/vim/vim/issues/5790) diff --git a/src/normal.c b/src/normal.c --- a/src/normal.c +++ b/src/normal.c @@ -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_pr #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 diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -739,6 +739,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 397, +/**/ 396, /**/ 395,