summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-27 20:13:03 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-27 20:13:03 +0200
commitd0e1b7103c14eb0d175c6b245b4b6ed93a204da9 (patch)
tree16bd1d7d65bc1c2a5538c8e48ac11982ef540352 /src/edit.c
parentac564082f118ccdca828980c5f10b65a40bffb4d (diff)
patch 8.2.1762: when a timer uses :stopinsert completion isn't stoppedv8.2.1762
Problem: When a timer uses :stopinsert Insert mode completion isn't stopped. (Stanley Chan) Solution: Call ins_compl_prep(ESC).
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/edit.c b/src/edit.c
index 642ff958bd..e3e4624fb0 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -587,8 +587,11 @@ edit(
if (stop_insert_mode)
{
// Insert mode ended, possibly from a callback.
+ if (c != K_IGNORE && c != K_NOP)
+ vungetc(c);
count = 0;
nomove = TRUE;
+ ins_compl_prep(ESC);
goto doESCkey;
}
} while (c == K_IGNORE || c == K_NOP);