On Wed, Jan 31, 2024 at 10:31:41PM +0100, Thomas Klausner wrote:
> I've tried to get my terminal+tmux to display true colors today using
> the latest terminfo as imported to NetBSD.

I debugged this a bit further.  It works fine if I just use two
entries, but as soon as a third in the style of kitty+setal is added,
it breaks.


--- terminfotest2 ---
kitty+setal|set underline colors (nonstandard),
        setal=\E[58:2::%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%dm,

minfirst|TermInfo Test,
# if the second number is >32767, it disappears!
       use=min, use=max,
maxfirst|TermInfo Test,
# putting the bigger one first makes "promotion" happen.
       use=max, use=min,

max|any number > INT16_MAX,
       colors#16777216,

min|any num < INT16_MAX,
       colors#8,

kittymin|kitty+min,
        use=kitty+setal, use=min, use=max
kittymax|kitty+max,
        use=kitty+setal, use=max, use=min
--- end of terminfotest2 ---

> tic -x terminfotest2

> infocmp -1x -A /home/wiz/terminfotest2.cdb minfirst
# Reconstructed from /home/wiz/terminfotest2.cdb
minfirst|TermInfo Test,
        colors#8,
> infocmp -1x -A /home/wiz/terminfotest2.cdb maxfirst
# Reconstructed from /home/wiz/terminfotest2.cdb
maxfirst|TermInfo Test,
        colors#16777216,

Here you can see the first encountered definition wins.

> infocmp -1x -A /home/wiz/terminfotest2.cdb kittymin
# Reconstructed from /home/wiz/terminfotest2.cdb
kittymin|kitty+min,
        colors#8,
        setal=\E[58:2::%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%dm,
> infocmp -1x -A /home/wiz/terminfotest2.cdb kittymax
# Reconstructed from /home/wiz/terminfotest2.cdb
kittymax|kitty+max,
        colors#8,
        setal=\E[58:2::%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%dm,

but here it doesn't any longer, or kitty+setal's non-definition counts
as an colors#8?

I've filed PR 58034 for this. Roy, Christos, can either of you please
take a look?

Thanks,
 Thomas

Reply via email to