mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Introduce bold color option
Introduce "bold" color option which only apply bold color formatting to existing system color. Also make "bold" the default color option. Fixes all white issue with black on white tio text.
This commit is contained in:
parent
9db7bb4fbb
commit
9733bdf19c
6 changed files with 31 additions and 10 deletions
12
src/print.c
12
src/print.c
|
|
@ -39,6 +39,14 @@ void print_normal(char c)
|
|||
|
||||
void print_init_ansi_formatting()
|
||||
{
|
||||
// Set bold text with user defined ANSI color
|
||||
sprintf(ansi_format, "\e[1;38;5;%dm", option.color);
|
||||
if (option.color == 256)
|
||||
{
|
||||
// Set bold text with no color changes
|
||||
sprintf(ansi_format, "\e[1m");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set bold text with user defined ANSI color
|
||||
sprintf(ansi_format, "\e[1;38;5;%dm", option.color);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue