mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 04:21:24 +00:00
Simplify Tc/COLORTERM=truecolor escape sequence
This should be more readable to most people, since C is more widely familiar than the terminfo language. * src/term.c (init_tty): Do the conversion from a single integer 24-bit color value to three 8-bit RGB values up-front. (Bug#70941)
This commit is contained in:
parent
8aa7f6a501
commit
74d411d600
1 changed files with 3 additions and 2 deletions
|
|
@ -4635,9 +4635,10 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
|
|||
|| ((bg = getenv ("COLORTERM")) != NULL
|
||||
&& strcasecmp (bg, "truecolor") == 0))
|
||||
{
|
||||
tty->TS_set_foreground = "\033[38;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%d%;m";
|
||||
tty->TS_set_background = "\033[48;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%d%;m";
|
||||
tty->TS_set_foreground = "\033[38;2;%p1%d;%p2%d;%p3%d%;m";
|
||||
tty->TS_set_background = "\033[48;2;%p1%d;%p2%d;%p3%d%;m";
|
||||
tty->TN_max_colors = 16777216;
|
||||
tty->TF_rgb_separate = 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue