aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/normal.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-03-26 09:24:04 +0800
committerGitHub <noreply@github.com>2023-03-26 09:24:04 +0800
commit4eef5ac453866dae7c03f5432fc8c4dfcda19f54 (patch)
tree5659978e15435ae63f445fabef685853e78b28ea /src/nvim/normal.c
parente3dab4b32609c63adfbb6bb425a4b19c1ff95cde (diff)
downloadrneovim-4eef5ac453866dae7c03f5432fc8c4dfcda19f54.tar.gz
rneovim-4eef5ac453866dae7c03f5432fc8c4dfcda19f54.tar.bz2
rneovim-4eef5ac453866dae7c03f5432fc8c4dfcda19f54.zip
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) https://github.com/vim/vim/commit/c174c2e58c9e24a75b189e01143e6d057b84e96e Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r--src/nvim/normal.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 605b0aee68..6ad1cbd987 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -1377,6 +1377,7 @@ static int normal_check(VimState *state)
// update cursor and redraw.
if (skip_redraw || exmode_active) {
skip_redraw = false;
+ setcursor();
} else if (do_redraw || stuff_empty()) {
// Ensure curwin->w_topline and curwin->w_leftcol are up to date
// before triggering a WinScrolled autocommand.