[BusyBox] [PATCH] Add CTRL-K support to cmdedit.c
Vladimir N. Oleynik
dzo at simtreas.ru
Thu Mar 28 02:03:03 UTC 2002
Jim,
> > > The following patch adds support for CTRL-K (clear to end of line),
> >
> > Thanks. I like this part.
>
> The "if (cursor) { ... }" block should be removed or it won't work if you
> are on the start of the line.
Ok. "size vs speed" ;)
> I must have been tired or something, sorry. ;)
>
> So it should look like this (with your correction to the CTRL-L portion
> applied, against busybox.stable):
> case 12:
> + /* Control-l -- clear screen */
> + printf("\033[H");
> + put_prompt();
> + redraw(cmdedit_y, 0);
> break;
Oh, no.
Please look once again mine patch.
Your part is not correct.
After clearing it is impossible to lift the cursor on cmdedit_y,
and also redraw() function calls itself put_prompt() function,
also must back cursor to old position after move to end in redraw().
--w
vodz
More information about the busybox
mailing list