diff --git a/src/editline.c b/src/editline.c index 70f3bbd..1d0cfa6 100644 --- a/src/editline.c +++ b/src/editline.c @@ -538,8 +538,11 @@ int rl_insert_text(const char *text) static el_status_t redisplay(void) { - /* XXX: Use "\r\e[K" to get really neat effect on ANSI capable terminals. */ - tty_puts(CLEAR); + if (rl_point == 0) + tty_puts(CLEAR); + else + tty_puts("\r\e[K"); + tty_puts(rl_prompt); tty_string(rl_line_buffer);