Skip to content

Commit

Permalink
don't set foreground color if set to default
Browse files Browse the repository at this point in the history
if left to default this would print escape code 29 which luckily did nothing
  • Loading branch information
karl committed Dec 9, 2024
1 parent 68dd3c8 commit ed7c2c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion output/terminal_noncurses.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ int init_terminal_noncurses(int tty, char *const fg_color_string, char *const bg
if (col == 38) {
struct colors fg_color = parse_color(fg_color_string);
printf("\033[38;2;%d;%d;%dm", fg_color.rgb[0], fg_color.rgb[1], fg_color.rgb[2]);
} else {
} else if (col < 38 && col >= 30) {
printf("\033[%dm", col); // setting color
}

Expand Down

0 comments on commit ed7c2c6

Please sign in to comment.