lineedit: fix Alt-D when cursor==0
Signed-off-by: Cliff Frey <cliff@meraki.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
2ffd710656
commit
4919565c15
@ -2527,9 +2527,9 @@ int FAST_FUNC read_line_input(line_input_t *st, const char *prompt, char *comman
|
||||
/* Delete word forward */
|
||||
int nc, sc = cursor;
|
||||
ctrl_right();
|
||||
nc = cursor;
|
||||
input_backward(cursor - sc);
|
||||
while (--nc >= cursor)
|
||||
nc = cursor - sc;
|
||||
input_backward(nc);
|
||||
while (--nc >= 0)
|
||||
input_delete(1);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user