summaryrefslogtreecommitdiffstats
path: root/src/edit.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/edit.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/edit.c')
-rw-r--r--src/edit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/edit.c b/src/edit.c
index 212efae3d4..84b6eef4b6 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -3688,6 +3688,7 @@ ins_esc(
else
{
--curwin->w_cursor.col;
+ curwin->w_valid &= ~(VALID_WCOL|VALID_VIRTCOL);
// Correct cursor for multi-byte character.
if (has_mbyte)
mb_adjust_cursor();