summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-06-17 19:36:33 +0200
committerBram Moolenaar <Bram@vim.org>2018-06-17 19:36:33 +0200
commit0e5979a6d491f68c4a8c86fab489016919329a6b (patch)
tree9b2ae8d0a64cefadf20aafd660a0fce2558dfe39 /src/edit.c
parent2f82ca7d79148ae931bf28a747ede06ba8a65de8 (diff)
patch 8.1.0069: cannot handle pressing CTRL-C in a prompt bufferv8.1.0069
Problem: Cannot handle pressing CTRL-C in a prompt buffer. Solution: Add prompt_setinterrupt().
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/edit.c b/src/edit.c
index 3204ec31a7..6a636b9e12 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -1016,6 +1016,19 @@ edit(
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: