diff options
author | Cliff Frey <cliff@meraki.com> | 2012-08-07 17:59:40 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-08-07 17:59:40 +0200 |
commit | 4919565c152f2ecee760b5419c947764e991ab3e (patch) | |
tree | a44eca676e32d78e8b0bb4a301b66f4308451155 /libbb | |
parent | 2ffd710656d83c4bcc66cef10e1fe7deb1c47605 (diff) | |
download | busybox-w32-4919565c152f2ecee760b5419c947764e991ab3e.tar.gz busybox-w32-4919565c152f2ecee760b5419c947764e991ab3e.tar.bz2 busybox-w32-4919565c152f2ecee760b5419c947764e991ab3e.zip |
lineedit: fix Alt-D when cursor==0
Signed-off-by: Cliff Frey <cliff@meraki.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/lineedit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index b89748a1c..92bea856e 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -2527,9 +2527,9 @@ int FAST_FUNC read_line_input(line_input_t *st, const char *prompt, char *comman | |||
2527 | /* Delete word forward */ | 2527 | /* Delete word forward */ |
2528 | int nc, sc = cursor; | 2528 | int nc, sc = cursor; |
2529 | ctrl_right(); | 2529 | ctrl_right(); |
2530 | nc = cursor; | 2530 | nc = cursor - sc; |
2531 | input_backward(cursor - sc); | 2531 | input_backward(nc); |
2532 | while (--nc >= cursor) | 2532 | while (--nc >= 0) |
2533 | input_delete(1); | 2533 | input_delete(1); |
2534 | break; | 2534 | break; |
2535 | } | 2535 | } |