terminal: make prefix bold

This commit is contained in:
King Kévin 2018-09-01 11:08:04 +02:00
parent 507d2d05de
commit c5fc45b5a1
1 changed files with 1 additions and 1 deletions

View File

@ -295,7 +295,7 @@ static void terminal_process_escape(void)
/** print current line and set position */ /** print current line and set position */
static void terminal_print_line(void) static void terminal_print_line(void)
{ {
printf("\r\x1b[K%s%s%s", terminal_prefix ? terminal_prefix : "", ": ", &terminal_buffer[terminal_line]); // erase line and display last one printf("\r\x1b[K\x1b[1m%s:\x1b[0m %s", terminal_prefix ? terminal_prefix : "", &terminal_buffer[terminal_line]); // erase line and display last one
if (terminal_pos<terminal_line+strlen(&terminal_buffer[terminal_line])) { // cursor is not at the end of the line if (terminal_pos<terminal_line+strlen(&terminal_buffer[terminal_line])) { // cursor is not at the end of the line
printf("\x1b[%uD", terminal_line+strlen(&terminal_buffer[terminal_line])-terminal_pos); // set position by going back printf("\x1b[%uD", terminal_line+strlen(&terminal_buffer[terminal_line])-terminal_pos); // set position by going back
} }