aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-05-05 06:58:20 +0800
committerGitHub <noreply@github.com>2022-05-05 06:58:20 +0800
commit6798f1fab0244ee535675fa9100945eec074e6e4 (patch)
treed70f31f988509ac0679a50b086bf316f5d481371 /src/nvim/edit.c
parente6c71574a07662c44b83c6cb07bf9b61bc06e136 (diff)
downloadrneovim-6798f1fab0244ee535675fa9100945eec074e6e4.tar.gz
rneovim-6798f1fab0244ee535675fa9100945eec074e6e4.tar.bz2
rneovim-6798f1fab0244ee535675fa9100945eec074e6e4.zip
vim-patch:8.2.4865: :startinsert right after :stopinsert may not work (#18418)
Problem: :startinsert right after :stopinsert does not work when popup menu is still visible. Solution: Use ins_compl_active() instead of pum_visible(). (closes vim/vim#10352) https://github.com/vim/vim/commit/cd5dbad184e8235beb13dcd8a22302da09db9766
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index f17ac52f15..f2c3f64790 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -553,7 +553,7 @@ static int insert_check(VimState *state)
Insstart_orig = Insstart;
}
- if (stop_insert_mode && !pum_visible()) {
+ if (stop_insert_mode && !compl_started) {
// ":stopinsert" used or 'insertmode' reset
s->count = 0;
return 0; // exit insert mode