summaryrefslogtreecommitdiffstatshomepage
path: root/lib/mp-readline/readline.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-10-09 22:41:10 +0100
committerDamien George <damien.p.george@gmail.com>2015-10-11 23:30:22 +0100
commit46a11028521425e7d6c85458c849bb96ff82152e (patch)
treec13f48bea9f947bc4c3e1cda04adc7d5437e8edf /lib/mp-readline/readline.c
parent1b586f3a734c27c78080fb2173bbde17168cb9e4 (diff)
downloadmicropython-46a11028521425e7d6c85458c849bb96ff82152e.tar.gz
micropython-46a11028521425e7d6c85458c849bb96ff82152e.zip
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/mp-readline/readline.c')
-rw-r--r--lib/mp-readline/readline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mp-readline/readline.c b/lib/mp-readline/readline.c
index d0449e97ea..31b60e2682 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) {