patch 9.0.1428: cursor in wrong position when leaving insert mode
Problem: Cursor in wrong position when leaving insert mode.
Solution: Update the w_valid flags. Position the cursor also when not
redrawing. (closes #12137)
diff --git a/src/main.c b/src/main.c
index d1c42ed..f5d3cb4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -305,7 +305,7 @@
params.want_full_screen = FALSE;
/*
- * When certain to start the GUI, don't check capabilities of terminal.
+ * When certain to start the GUI, don't check terminal capabilities.
* For GTK we can't be sure, but when started from the desktop it doesn't
* make sense to try using a terminal.
*/
@@ -1290,7 +1290,11 @@
* update cursor and redraw.
*/
if (skip_redraw || exmode_active)
+ {
skip_redraw = FALSE;
+ setcursor();
+ cursor_on();
+ }
else if (do_redraw || stuff_empty())
{
#ifdef FEAT_GUI