From a278ee2a8c47da118d774ca8efdf3e1a29d2206f Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 12 Nov 2017 16:46:28 +0000 Subject: Replace italics with reversed when the curses module is too old to support it. --- poezio/theming.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'poezio/theming.py') diff --git a/poezio/theming.py b/poezio/theming.py index af1c7839..b5c9d516 100755 --- a/poezio/theming.py +++ b/poezio/theming.py @@ -466,8 +466,8 @@ def to_curses_attr(color_tuple): curses_pair = curses_pair | curses.A_BOLD if 'u' in additional_val: curses_pair = curses_pair | curses.A_UNDERLINE - if 'i' in additional_val and hasattr(curses, 'A_ITALIC'): - curses_pair = curses_pair | curses.A_ITALIC + if 'i' in additional_val: + curses_pair = curses_pair | (curses.A_ITALIC if hasattr(curses, 'A_ITALIC') else curses.A_REVERSE) if 'a' in additional_val: curses_pair = curses_pair | curses.A_BLINK return curses_pair -- cgit v1.2.3