[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] lineedit: don't block when looking for escape sequence in vi-mode
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2014-12-15 12:31:11
Message-ID: CAK1hOcOComG6PciyCMryAGbF5YjiPBBzYLz=qm7pDZOUbbfBPQ () mail ! gmail ! com
[Download RAW message or body]

Applied, thanks!

On Fri, Dec 12, 2014 at 9:29 AM, Ron Yorston <rmy@tigress.co.uk> wrote:
> 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.
>
> Signed-off-by: Ron Yorston <rmy@tigress.co.uk>
> ---
>  libbb/lineedit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libbb/lineedit.c b/libbb/lineedit.c
> index 3961b1d..720a495 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-<key> generates ESC-<key>.
>                          */
> -                       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':
> --
> 1.9.3
>
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic