commit | 6f04391cecd8579f4bf5007b456e9ee79d718cff | [log] [tgz] |
---|---|---|
author | Denis Vlasenko <vda.linux@googlemail.com> | Mon Feb 18 22:28:03 2008 +0000 |
committer | Denis Vlasenko <vda.linux@googlemail.com> | Mon Feb 18 22:28:03 2008 +0000 |
tree | 608ea3d5e50d118b854998cb0afa3009f93f0dc8 | |
parent | de7684a309ad20c1b889d048d741cb1dd52245f7 [diff] [blame] |
lineedit: tiny shrink
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 18cf7cc..529344f 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c
@@ -246,7 +246,15 @@ if (cmdedit_x >= num) { cmdedit_x -= num; if (num <= 4) { - printf("\b\b\b\b" + (4-num)); + /* This is longer by 5 bytes on x86. + * Also gets mysteriously + * miscompiled for some ARM users. + * printf(("\b\b\b\b" + 4) - num); + * return; + */ + do { + bb_putchar('\b'); + } while (--num); return; } printf("\033[%uD", num);