diff options
Diffstat (limited to 'poezio/windows/inputs.py')
-rw-r--r-- | poezio/windows/inputs.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/poezio/windows/inputs.py b/poezio/windows/inputs.py index 0ccd179e..d2ea5fbb 100644 --- a/poezio/windows/inputs.py +++ b/poezio/windows/inputs.py @@ -485,7 +485,7 @@ class Input(Win): if y is not None and x is not None: self.move(y, x) format_char = find_first_format_char(text, chars) - has_italic = hasattr(curses, 'A_ITALIC') + attr_italic = curses.A_ITALIC if hasattr(curses, 'A_ITALIC') else curses.A_REVERSE while format_char != -1: if text[format_char] == '\n': attr_char = '|' @@ -501,8 +501,8 @@ class Input(Win): 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) elif attr_char in string.digits and attr_char != '': self._win.attron(to_curses_attr((int(attr_char), -1))) format_char = find_first_format_char(text, chars) |