From 46a11028521425e7d6c85458c849bb96ff82152e Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 9 Oct 2015 22:41:10 +0100 Subject: repl: Add paste mode to friendly REPL, entered via CTRL-E. Use CTRL-E to enter paste mode. Prompt starts with "===" and accepts all characters verbatim, echoing them back. Only control characters are CTRL-C which cancels the input and returns to normal REPL, and CTRL-D which ends the input and executes it. The input is executed as though it were a file. The input is not added to the prompt history. --- lib/mp-readline/readline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/mp-readline/readline.c b/lib/mp-readline/readline.c index d0449e97e..31b60e268 100644 --- a/lib/mp-readline/readline.c +++ b/lib/mp-readline/readline.c @@ -105,7 +105,7 @@ int readline_process_char(int c) { bool redraw_from_cursor = false; int redraw_step_forward = 0; if (rl.escape_seq == ESEQ_NONE) { - if (CHAR_CTRL_A <= c && c <= CHAR_CTRL_D && vstr_len(rl.line) == rl.orig_line_len) { + if (CHAR_CTRL_A <= c && c <= CHAR_CTRL_E && vstr_len(rl.line) == rl.orig_line_len) { // control character with empty line return c; } else if (c == CHAR_CTRL_A) { -- cgit v1.2.3