From c8f20188ae14ce2f9da8d263fbefbe88bda16075 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Mon, 7 Apr 2014 13:35:43 +0100 Subject: Use ANSI escape to move cursor back during line editing BusyBox attempts to optimise for slow terminals by using backspace for small movements. In the Windows console this results in the cursor becoming invisible during backward movement. --- libbb/lineedit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 4cb9eba4b..a49149921 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -465,6 +465,7 @@ static void input_backward(unsigned num) if (cmdedit_x >= num) { cmdedit_x -= num; +#if !ENABLE_PLATFORM_MINGW32 if (num <= 4) { /* This is longer by 5 bytes on x86. * Also gets miscompiled for ARM users @@ -477,6 +478,7 @@ static void input_backward(unsigned num) } while (--num); return; } +#endif printf(ESC"[%uD", num); return; } -- cgit v1.2.3-55-g6feb