diff options
author | Florent Le Coz <louiz@louiz.org> | 2015-08-31 15:48:32 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2015-08-31 15:48:32 +0200 |
commit | 160693711d9df30564146fc826276c38d6ea2e18 (patch) | |
tree | 1972268a257c2f8b9ecac77b065172b45c96d3a0 /src | |
parent | 7bd6dd37c20a0206768c5f950d181f3fce7bc0f0 (diff) | |
download | poezio-160693711d9df30564146fc826276c38d6ea2e18.tar.gz poezio-160693711d9df30564146fc826276c38d6ea2e18.tar.bz2 poezio-160693711d9df30564146fc826276c38d6ea2e18.tar.xz poezio-160693711d9df30564146fc826276c38d6ea2e18.zip |
Reset the bold and underline attribute when absent, in addstr_colored
Diffstat (limited to 'src')
-rw-r--r-- | src/windows/base_wins.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/windows/base_wins.py b/src/windows/base_wins.py index 915242a9..464c6fa1 100644 --- a/src/windows/base_wins.py +++ b/src/windows/base_wins.py @@ -137,6 +137,10 @@ class Win(object): self._win.attron(curses.A_UNDERLINE) elif char == 'b': self._win.attron(curses.A_BOLD) + else: + # this will reset previous bold/uderline sequences if any was used + self._win.attroff(curses.A_UNDERLINE) + self._win.attroff(curses.A_BOLD) elif color_str: self._win.attron(to_curses_attr((int(color_str), -1))) text = text[next_attr_char+len(color_str)+2:] |