summaryrefslogtreecommitdiff
path: root/poezio/theming.py
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2017-11-12 16:46:28 +0000
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2017-11-12 16:46:28 +0000
commita278ee2a8c47da118d774ca8efdf3e1a29d2206f (patch)
tree365abd95402e17391096f92faa3e8a0451297b5c /poezio/theming.py
parent9a89ba18e69d617fe01c3bde8761b80e90a726b5 (diff)
downloadpoezio-a278ee2a8c47da118d774ca8efdf3e1a29d2206f.tar.gz
poezio-a278ee2a8c47da118d774ca8efdf3e1a29d2206f.tar.bz2
poezio-a278ee2a8c47da118d774ca8efdf3e1a29d2206f.tar.xz
poezio-a278ee2a8c47da118d774ca8efdf3e1a29d2206f.zip
Replace italics with reversed when the curses module is too old to support it.
Diffstat (limited to 'poezio/theming.py')
-rwxr-xr-xpoezio/theming.py4
1 files changed, 2 insertions, 2 deletions
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