minor vi bug (and possible fix)
Denys Vlasenko
vda.linux at googlemail.com
Fri Mar 26 15:11:02 UTC 2010
On Thu, Mar 25, 2010 at 12:41 AM, John Greco <greco at 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
More information about the busybox
mailing list