mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 23:18:33 +00:00
vim-patch:9.0.1428: cursor in wrong position when leaving insert mode (#22786)
Problem: Cursor in wrong position when leaving insert mode.
Solution: Update the w_valid flags. Position the cursor also when not
redrawing. (closes vim/vim#12137)
c174c2e58c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -3457,6 +3457,7 @@ static bool ins_esc(long *count, int cmdchar, bool nomove)
|
||||
}
|
||||
} else {
|
||||
curwin->w_cursor.col--;
|
||||
curwin->w_valid &= ~(VALID_WCOL|VALID_VIRTCOL);
|
||||
// Correct cursor for multi-byte character.
|
||||
mb_adjust_cursor();
|
||||
}
|
||||
|
Reference in New Issue
Block a user