aboutsummaryrefslogtreecommitdiff
path: root/libbb/lineedit.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r--libbb/lineedit.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 37c106bd8..e7b9ddfa1 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -2440,6 +2440,11 @@ int FAST_FUNC read_line_input(line_input_t *st, const char *prompt, char *comman
2440 2440
2441 fflush_all(); 2441 fflush_all();
2442 ic = ic_raw = lineedit_read_key(read_key_buffer, timeout); 2442 ic = ic_raw = lineedit_read_key(read_key_buffer, timeout);
2443#if ENABLE_PLATFORM_MINGW32
2444 /* scroll to cursor position on any keypress */
2445 if (isatty(fileno(stdin)) && isatty(fileno(stdout)))
2446 move_cursor_row(0);
2447#endif
2443 2448
2444#if ENABLE_FEATURE_REVERSE_SEARCH 2449#if ENABLE_FEATURE_REVERSE_SEARCH
2445 again: 2450 again:
@@ -2510,9 +2515,6 @@ int FAST_FUNC read_line_input(line_input_t *st, const char *prompt, char *comman
2510 case CTRL('L'): 2515 case CTRL('L'):
2511 vi_case(CTRL('L')|VI_CMDMODE_BIT:) 2516 vi_case(CTRL('L')|VI_CMDMODE_BIT:)
2512 /* Control-l -- clear screen */ 2517 /* Control-l -- clear screen */
2513#if ENABLE_PLATFORM_MINGW32
2514 printf(ESC"[0A"); /* move to current cursor postion */
2515#endif
2516 printf(ESC"[H"); /* cursor to top,left */ 2518 printf(ESC"[H"); /* cursor to top,left */
2517 redraw(0, command_len - cursor); 2519 redraw(0, command_len - cursor);
2518 break; 2520 break;