From cc4baaff0df7de34d86f6575c22826951e975ff0 Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Mon, 17 Sep 2018 07:01:15 +0900 Subject: [PATCH] Steal an idea from fish to handle output without a trailing linefeed --- lib/rline_exp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/rline_exp.c b/lib/rline_exp.c index 30e97eed..6da7c32d 100644 --- a/lib/rline_exp.c +++ b/lib/rline_exp.c @@ -1395,6 +1395,11 @@ static int read_line(void) { int this_buf[20]; uint32_t istate = 0; + set_colors(COLOR_ALT_FG, COLOR_ALT_BG); + fprintf(stdout, "^M\033[0m"); + for (int i = 0; i < width + prompt_right_width - 2; ++i) { + fprintf(stdout, " "); + } render_line(); place_cursor_actual();