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).
diff --git a/src/edit.c b/src/edit.c
index 642ff95..e3e4624 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -587,8 +587,11 @@
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);