summaryrefslogtreecommitdiffstats
path: root/mode-tree.c
diff options
context:
space:
mode:
authornicm <nicm>2018-02-04 10:10:39 +0000
committernicm <nicm>2018-02-04 10:10:39 +0000
commitfe7a871a23ada0c71fb0886ef99a356c67bf5c0d (patch)
tree8f7e6e63206554274470114f06ee0fce7615bcc4 /mode-tree.c
parent17d4c39f24be7c22e1866d1587d77dcca7e6a2d8 (diff)
Upstream ncurses has introduced terminfo capabilities to specify RGB
colour ("true" or "direct" colour). These consist of new entries (such as "xterm-direct") which have a different setaf/setab implementation, colors and pairs set to 0x1000000 and 0x10000, and a new RGB flag. The setaf/setab definitions seem to be geared towards what ncurses (or emacs maybe) needs, in that the new versions do only ANSI and RGB colours (they can't be used for the 256 colour palette); they rely on the silly ISO colon-separated version of SGR; and they use a weird multiplication scheme so they still only need one argument. The higher values of colors and pairs require a recent ncurses to parse. tmux can use the RGB flag to detect RGB colour support (keeping the old Tc extension for backwards compatibility for now). However, as we still want to send 256 colour information unchanged when possible, the new setaf/setab are awkward. So when RGB is present, reserve setaf/setab only for ANSI colours and use the escape sequences directly for 256 and RGB colours. (To my knowledge no recent terminal uses unusual escape sequences for these in any case.)
Diffstat (limited to 'mode-tree.c')
0 files changed, 0 insertions, 0 deletions