patch 8.1.0069: cannot handle pressing CTRL-C in a prompt buffer
Problem: Cannot handle pressing CTRL-C in a prompt buffer.
Solution: Add prompt_setinterrupt().
diff --git a/src/edit.c b/src/edit.c
index 3204ec3..6a636b9 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -1016,6 +1016,19 @@
goto doESCkey;
}
#endif
+#ifdef FEAT_JOB_CHANNEL
+ if (c == Ctrl_C && bt_prompt(curbuf))
+ {
+ if (invoke_prompt_interrupt())
+ {
+ if (!bt_prompt(curbuf))
+ // buffer changed to a non-prompt buffer, get out of
+ // Insert mode
+ goto doESCkey;
+ break;
+ }
+ }
+#endif
#ifdef UNIX
do_intr: