diff options
-rw-r--r-- | common/main.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/common/main.c b/common/main.c index 54ef79e..8d548db 100644 --- a/common/main.c +++ b/common/main.c @@ -643,12 +643,10 @@ static void cread_print_hist_list(void) #define ERASE_TO_EOL() { \ if (num < eol_num) { \ - int tmp; \ - for (tmp = num; tmp < eol_num; tmp++) \ - getcmd_putch(' '); \ - while (tmp-- > num) \ + printf("%*s", (int)(eol_num - num), ""); \ + do { \ getcmd_putch(CTL_BACKSPACE); \ - eol_num = num; \ + } while (--eol_num > num); \ } \ } |