diff options
Diffstat (limited to 'linenoise')
-rw-r--r-- | linenoise/linenoise.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linenoise/linenoise.c b/linenoise/linenoise.c index 225fcb8d..7e78adf9 100644 --- a/linenoise/linenoise.c +++ b/linenoise/linenoise.c @@ -1775,7 +1775,7 @@ static int edit(lino_t *l, const char *prompt) continue; } - if (extended && c != TAB) { + if (extended && c != TAB && c != ESC) { switch (c) { case CTL('E'): extended = 0; @@ -1983,6 +1983,7 @@ static int edit(lino_t *l, const char *prompt) edit_history_next(l, LINENOISE_HISTORY_NEXT); break; case ESC: + extended = 0; /* Read the next two bytes representing the escape sequence. * Use two calls to handle slow terminals returning the two * chars at different times. */ |