Steal an idea from fish to handle output without a trailing linefeed

This commit is contained in:
K. Lange 2018-09-17 07:01:15 +09:00
parent 21ff48d6aa
commit cc4baaff0d
1 changed files with 5 additions and 0 deletions

View File

@ -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();