From 20cd31a2d7cc1b633b725280eb7546ca14eef7eb Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Fri, 12 Dec 2014 08:29:41 +0000 Subject: lineedit: don't block when looking for escape sequence in vi-mode In vi-mode lineedit tries to detect some escape sequences. After the ESC 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. Signed-off-by: Ron Yorston Signed-off-by: Denys Vlasenko --- libbb/lineedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 3961b1de3..720a4951e 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -2611,7 +2611,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, 50); switch (ic) { //case KEYCODE_LEFT: - bash doesn't do this case 'b': -- cgit v1.2.3