From d0e1b7103c14eb0d175c6b245b4b6ed93a204da9 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 27 Sep 2020 20:13:03 +0200 Subject: patch 8.2.1762: when a timer uses :stopinsert completion isn't stopped Problem: When a timer uses :stopinsert Insert mode completion isn't stopped. (Stanley Chan) Solution: Call ins_compl_prep(ESC). --- src/edit.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/edit.c') diff --git a/src/edit.c b/src/edit.c index 642ff958b..e3e4624fb 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); -- cgit v1.2.1