STINNER Victor <vstin...@redhat.com> added the comment:

On my Fedora 30 with libncursesw, A_COLOR = 0xff00.

After my change, _curses uses:

    static inline short
    attr_to_color_pair(int attr)
    {
        return (short)((attr & A_COLOR) >> 8);
    }

    ...
    setcchar(&wcval, wstr, attr, attr_to_color_pair(attr), NULL);
    ...

If someone gets troubles with attr passed "directly" as the 3rd argument of 
setcchar(), we can try to pass (attr & ~A_COLOR) instead. On my Linux, it would 
mean: only pass the low 8 bits of attr.

But since it "just" works on my Linux, I prefer to only make minimum changes to 
fix this issue on Linux.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37738>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to