terminal: make prefix bold
This commit is contained in:
parent
507d2d05de
commit
c5fc45b5a1
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue