diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-18 22:28:03 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-18 22:28:03 +0000 |
commit | 6f04391cecd8579f4bf5007b456e9ee79d718cff (patch) | |
tree | 608ea3d5e50d118b854998cb0afa3009f93f0dc8 /libbb/lineedit.c | |
parent | de7684a309ad20c1b889d048d741cb1dd52245f7 (diff) | |
download | busybox-w32-6f04391cecd8579f4bf5007b456e9ee79d718cff.tar.gz busybox-w32-6f04391cecd8579f4bf5007b456e9ee79d718cff.tar.bz2 busybox-w32-6f04391cecd8579f4bf5007b456e9ee79d718cff.zip |
lineedit: tiny shrink
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r-- | libbb/lineedit.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 18cf7cc99..529344f6c 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -246,7 +246,15 @@ static void input_backward(unsigned num) | |||
246 | if (cmdedit_x >= num) { | 246 | if (cmdedit_x >= num) { |
247 | cmdedit_x -= num; | 247 | cmdedit_x -= num; |
248 | if (num <= 4) { | 248 | if (num <= 4) { |
249 | printf("\b\b\b\b" + (4-num)); | 249 | /* This is longer by 5 bytes on x86. |
250 | * Also gets mysteriously | ||
251 | * miscompiled for some ARM users. | ||
252 | * printf(("\b\b\b\b" + 4) - num); | ||
253 | * return; | ||
254 | */ | ||
255 | do { | ||
256 | bb_putchar('\b'); | ||
257 | } while (--num); | ||
250 | return; | 258 | return; |
251 | } | 259 | } |
252 | printf("\033[%uD", num); | 260 | printf("\033[%uD", num); |