diff src/edit.c @ 14103:d053ec57d886 v8.1.0069

patch 8.1.0069: cannot handle pressing CTRL-C in a prompt buffer commit https://github.com/vim/vim/commit/0e5979a6d491f68c4a8c86fab489016919329a6b Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 17 19:36:33 2018 +0200 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().
author Christian Brabandt <cb@256bit.org>
date Sun, 17 Jun 2018 19:45:06 +0200
parents a9d94f10ecef
children 2ad722003b36
line wrap: on
line diff
--- 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: