summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2023-03-25 20:06:49 +0000
committerBram Moolenaar <Bram@vim.org>2023-03-25 20:06:49 +0000
commitc174c2e58c9e24a75b189e01143e6d057b84e96e (patch)
treedeb9aa525c7fd782b00c18c9f69a53a091aa893a /src/main.c
parent1f76138ff1d08a8474cfcaf743448caf679416a3 (diff)
patch 9.0.1428: cursor in wrong position when leaving insert modev9.0.1428
Problem: Cursor in wrong position when leaving insert mode. Solution: Update the w_valid flags. Position the cursor also when not redrawing. (closes #12137)
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index d1c42ed120..f5d3cb4193 100644
--- a/src/main.c
+++ b/src/main.c
@@ -305,7 +305,7 @@ main
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 @@ main_loop(
* update cursor and redraw.
*/
if (skip_redraw || exmode_active)
+ {
skip_redraw = FALSE;
+ setcursor();
+ cursor_on();
+ }
else if (do_redraw || stuff_empty())
{
#ifdef FEAT_GUI