[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble with wattr_set()

From: Bryan Christ
Subject: Re: Trouble with wattr_set()
Date: Mon, 21 Jan 2019 10:57:34 -0600


If I clamp the upper value of what a custom pair can be defined as to 255 or lower, then Bionic is happy (ABI 5).  The only explanation that I can see for the behavior is that xfce, gnome-term, etc, are really vte which has a limit of 256 pairs or less.  But the environment variables deceive ncurses by setting TERM to "xterm-256color" and COLORTERM  to "truecolor".  So maybe when I query tigetnum("pairs") I'm actually being told that the underlying terminal can support more color pairs than it actually does.  Is this explanation plausible?

On Fri, Jan 18, 2019 at 7:21 PM Bryan Christ <address@hidden> wrote:
This snippet of code works perfectly on Fedora 29...

wattr_set(vterm->window, attrs, colors, NULL);
mvwadd_wch(vterm->window, r, c, &vcell->uch);

However, on Bionic, the text is there but color attributes are something like dark gray on black.  When I add debug code with pair_content() and color_content() everything looks fine:

pair: 766, f: 245, g: 235
f rgb:  r: 572, g: 627, b: 627
b rgb:  r: 23, g: 211, b: 258

When I check the return value from wattr_set() there's no ERR either.  It's almost like the wattr_set() is refusing to accept the color pair I feed it.   Other color pairs in the single and double digit range work just fine.  I'm just about to pull out my last hair trying to figure out what might be different.  Any thoughts or comments appreciated.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]