projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de7684a
)
lineedit: tiny shrink
author
Denis Vlasenko
<vda.linux@googlemail.com>
Mon, 18 Feb 2008 22:28:03 +0000
(22:28 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Mon, 18 Feb 2008 22:28:03 +0000
(22:28 -0000)
libbb/lineedit.c
patch
|
blob
|
history
diff --git
a/libbb/lineedit.c
b/libbb/lineedit.c
index 18cf7cc993a339d656e7139ae6a2d44d0d475978..529344f6c2e4e2c42350137943b9075fc286e5e8 100644
(file)
--- a/
libbb/lineedit.c
+++ b/
libbb/lineedit.c
@@
-246,7
+246,15
@@
static void input_backward(unsigned num)
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);