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

List:       busybox
Subject:    Re: minor vi bug (and possible fix)
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2010-03-26 15:11:02
Message-ID: 1158166a1003260811y363bb542mcc002af5b6b35b31 () mail ! gmail ! com
[Download RAW message or body]

On Thu, Mar 25, 2010 at 12:41 AM, John Greco <greco@drexel.edu> wrote:
> I've noticed that busybox's vi doesn't handle <count>$ like other vi
> implementations.  From Vim's help section on $:
>
> $  or <End>      To the end of the line.  When a count is given also go
>                 [count - 1] lines downward |inclusive|.
>
> This behaviour is also mentioned in:
> <http://www.opengroup.org/onlinepubs/9699919799/utilities/vi.html>
>
> Busybox's vi does not act on any count given for $.
>
> A very simple one line fix could be:
>
>        case '$':                       // $- goto end of line
>        case KEYCODE_END:               // Cursor Key End
>                if (cmdcnt-- > 1) {
> +                       dot_next();
>                        do_cmd(c);
>                }                               // repeat cnt
>                dot = end_line(dot);

Applied, thanks!
-- 
vda
_______________________________________________
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