summaryrefslogtreecommitdiff
path: root/src/windows
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2015-08-31 15:48:32 +0200
committerFlorent Le Coz <louiz@louiz.org>2015-08-31 15:48:32 +0200
commit160693711d9df30564146fc826276c38d6ea2e18 (patch)
tree1972268a257c2f8b9ecac77b065172b45c96d3a0 /src/windows
parent7bd6dd37c20a0206768c5f950d181f3fce7bc0f0 (diff)
downloadpoezio-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/windows')
-rw-r--r--src/windows/base_wins.py4
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:]