aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@tigress.co.uk>2014-12-12 08:29:41 +0000
committerDenys Vlasenko <vda.linux@googlemail.com>2014-12-15 13:30:58 +0100
commit20cd31a2d7cc1b633b725280eb7546ca14eef7eb (patch)
tree934bdc678f3a66b381f83f3269b586aded5e4206
parentacb8be721768b54075a51d1859d390904a0f1f6c (diff)
downloadbusybox-w32-20cd31a2d7cc1b633b725280eb7546ca14eef7eb.tar.gz
busybox-w32-20cd31a2d7cc1b633b725280eb7546ca14eef7eb.tar.bz2
busybox-w32-20cd31a2d7cc1b633b725280eb7546ca14eef7eb.zip
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 <rmy@tigress.co.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--libbb/lineedit.c2
1 files changed, 1 insertions, 1 deletions
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
2611 * standard readline bindings (IOW: bash) do. 2611 * standard readline bindings (IOW: bash) do.
2612 * Often, Alt-<key> generates ESC-<key>. 2612 * Often, Alt-<key> generates ESC-<key>.
2613 */ 2613 */
2614 ic = lineedit_read_key(read_key_buffer, timeout); 2614 ic = lineedit_read_key(read_key_buffer, 50);
2615 switch (ic) { 2615 switch (ic) {
2616 //case KEYCODE_LEFT: - bash doesn't do this 2616 //case KEYCODE_LEFT: - bash doesn't do this
2617 case 'b': 2617 case 'b':