From be7542b8c822877da31b14177cbec1435a097ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Sun, 10 May 2020 15:05:16 +0200 Subject: Add explicit color flag for reverse video mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- poezio/theming.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/poezio/theming.py b/poezio/theming.py index e5095507..f0309f65 100755 --- a/poezio/theming.py +++ b/poezio/theming.py @@ -487,6 +487,8 @@ def to_curses_attr( curses, 'A_ITALIC') else curses.A_REVERSE) if 'a' in additional_val: curses_pair = curses_pair | curses.A_BLINK + if 'r' in additional_val: + curses_pair = curses_pair | curses.A_REVERSE return curses_pair -- cgit v1.2.3