From 912600054c309718b25eca13f9d10825ac707f80 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sat, 13 Dec 2014 15:51:16 +0000 Subject: lineedit: don't block when looking for escape sequence in vi-mode When in vi-mode lineedit tries to detect some escape sequences. After an escape it reads the next character to check for certain values. This read should have a timeout or a user-entered ESC to switch to command mode doesn't properly handle the next character. --- libbb/lineedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 71dd12a61..1f5653cb5 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -2668,7 +2668,7 @@ int FAST_FUNC read_line_input(line_input_t *st, const char *prompt, char *comman * standard readline bindings (IOW: bash) do. * Often, Alt- generates ESC-. */ - ic = lineedit_read_key(read_key_buffer, timeout); + ic = lineedit_read_key(read_key_buffer, 20); switch (ic) { //case KEYCODE_LEFT: - bash doesn't do this case 'b': -- cgit v1.2.3-55-g6feb