0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

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)
This commit is contained in:
Bram Moolenaar
2023-03-25 20:06:49 +00:00
parent 1f76138ff1
commit c174c2e58c
5 changed files with 31 additions and 1 deletions

View File

@@ -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();