Add explicit color flag for reverse video mode

Reverse video mode is useful when using the CCG/XEP-0392 palette.
Since we don’t know the true background color and the CCG palette
is (presumably) made for a specific background color (range), it
can currently only be used as foreground colour against a `-1`
background. Reverse video mode also allows it to be used as
background colour (with the normal background colour as foreground
colour).
This commit is contained in:
Jonas Schäfer 2020-05-10 15:05:16 +02:00 committed by Link Mauve
parent 925bf01bf5
commit be7542b8c8

View file

@ -487,6 +487,8 @@ def to_curses_attr(
curses, 'A_ITALIC') else curses.A_REVERSE) curses, 'A_ITALIC') else curses.A_REVERSE)
if 'a' in additional_val: if 'a' in additional_val:
curses_pair = curses_pair | curses.A_BLINK curses_pair = curses_pair | curses.A_BLINK
if 'r' in additional_val:
curses_pair = curses_pair | curses.A_REVERSE
return curses_pair return curses_pair