diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/lineedit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index e62975db3..2c849eb74 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -171,7 +171,7 @@ static void input_backward(unsigned num) | |||
171 | if (cmdedit_x >= num) { | 171 | if (cmdedit_x >= num) { |
172 | cmdedit_x -= num; | 172 | cmdedit_x -= num; |
173 | if (num <= 4) { | 173 | if (num <= 4) { |
174 | do putchar('\b'); while (--num); | 174 | printf("\b\b\b\b" + (4-num)); |
175 | return; | 175 | return; |
176 | } | 176 | } |
177 | printf("\033[%uD", num); | 177 | printf("\033[%uD", num); |
@@ -183,7 +183,7 @@ static void input_backward(unsigned num) | |||
183 | count_y = 1 + (num / cmdedit_termw); | 183 | count_y = 1 + (num / cmdedit_termw); |
184 | cmdedit_y -= count_y; | 184 | cmdedit_y -= count_y; |
185 | cmdedit_x = cmdedit_termw * count_y - num; | 185 | cmdedit_x = cmdedit_termw * count_y - num; |
186 | /* go to 1st col; go up; go to correct column */ | 186 | /* go to 1st column; go up; go to correct column */ |
187 | printf("\r" "\033[%dA" "\033[%dC", count_y, cmdedit_x); | 187 | printf("\r" "\033[%dA" "\033[%dC", count_y, cmdedit_x); |
188 | } | 188 | } |
189 | 189 | ||