summaryrefslogtreecommitdiffstats
path: root/package/busybox/busybox-1.9.1-lineedit.patch
blob: 6f42a8e3b49a294fb7caa5a7ded2cd8e846f314b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- busybox-1.9.1/libbb/lineedit.c	Tue Feb 12 17:10:25 2008
+++ busybox-1.9.1-lineedit/libbb/lineedit.c	Mon Feb 18 23:26:54 2008
@@ -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);