summaryrefslogtreecommitdiff
path: root/poezio/windows/base_wins.py
diff options
context:
space:
mode:
Diffstat (limited to 'poezio/windows/base_wins.py')
-rw-r--r--poezio/windows/base_wins.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/poezio/windows/base_wins.py b/poezio/windows/base_wins.py
index f3970ff5..8163dad5 100644
--- a/poezio/windows/base_wins.py
+++ b/poezio/windows/base_wins.py
@@ -101,7 +101,7 @@ class Win(object):
if y is not None and x is not None:
self.move(y, x)
next_attr_char = text.find(FORMAT_CHAR)
- has_italic = hasattr(curses, 'A_ITALIC')
+ attr_italic = curses.A_ITALIC if hasattr(curses, 'A_ITALIC') else curses.A_REVERSE
while next_attr_char != -1 and text:
if next_attr_char + 1 < len(text):
attr_char = text[next_attr_char + 1].lower()
@@ -115,8 +115,8 @@ class Win(object):
self._win.attron(curses.A_UNDERLINE)
elif attr_char == 'b':
self._win.attron(curses.A_BOLD)
- elif attr_char == 'i' and has_italic:
- self._win.attron(curses.A_ITALIC)
+ elif attr_char == 'i':
+ self._win.attron(attr_italic)
if (attr_char in string.digits
or attr_char == '-') and attr_char != '':
color_str = text[next_attr_char + 1:text.find(
@@ -132,7 +132,7 @@ class Win(object):
elif char == 'b':
self._win.attron(curses.A_BOLD)
elif char == 'i' and has_italic:
- self._win.attron(curses.A_ITALIC)
+ self._win.attron(attr_italic)
else:
# this will reset previous bold/uderline sequences if any was used
self._win.attroff(curses.A_UNDERLINE)