patch 8.0.0671: hang when typing CTRL-C in confirm() in timer
Problem: When a function invoked from a timer calls confirm() and the user
types CTRL-C then Vim hangs.
Solution: Reset typebuf_was_filled. (Ozaki Kiichi, closes #1791)
diff --git a/src/getchar.c b/src/getchar.c
index 44b246d..3decef3 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -467,6 +467,11 @@
;
typebuf.tb_off = MAXMAPLEN;
typebuf.tb_len = 0;
+#if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL)
+ /* Reset the flag that text received from a client or from feedkeys()
+ * was inserted in the typeahead buffer. */
+ typebuf_was_filled = FALSE;
+#endif
}
else /* remove mapped characters at the start only */
{