diff options
| author | Damien George | 2015-10-09 22:41:10 +0100 |
|---|---|---|
| committer | Damien George | 2015-10-11 23:30:22 +0100 |
| commit | 46a11028521425e7d6c85458c849bb96ff82152e (patch) | |
| tree | c13f48bea9f947bc4c3e1cda04adc7d5437e8edf /lib | |
| parent | 1b586f3a734c27c78080fb2173bbde17168cb9e4 (diff) | |
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.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/mp-readline/readline.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |
