STINNER Victor <> 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 <>
Python-bugs-list mailing list

Reply via email to