aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-01-27 08:31:17 +0100
committerGitHub <noreply@github.com>2022-01-27 08:31:17 +0100
commitf1b91fcdbdf5f2e639aed8155c6d668c0b33ec6c (patch)
treef4463da4ffbf6e7ef7819fe543ea69077f840384 /src/nvim/edit.c
parent00915864f72e0052ecdb40629c838c622c7720a0 (diff)
parent8e945c2524f26e019959e82072e783cdaa694818 (diff)
downloadrneovim-f1b91fcdbdf5f2e639aed8155c6d668c0b33ec6c.tar.gz
rneovim-f1b91fcdbdf5f2e639aed8155c6d668c0b33ec6c.tar.bz2
rneovim-f1b91fcdbdf5f2e639aed8155c6d668c0b33ec6c.zip
Merge pull request #17102 from zeertzjq/vim-8.2.1762
vim-patch:8.2.1762: when a timer uses :stopinsert completion isn't stopped
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index a9c606ec13..cafc764ddf 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -663,8 +663,12 @@ static int insert_execute(VimState *state, int key)
InsertState *const s = (InsertState *)state;
if (stop_insert_mode) {
// Insert mode ended, possibly from a callback.
+ if (key != K_IGNORE && key != K_NOP) {
+ vungetc(key);
+ }
s->count = 0;
s->nomove = true;
+ ins_compl_prep(ESC);
return 0;
}