Commit 16069371 authored by louiz’'s avatar louiz’

Reset the bold and underline attribute when absent, in addstr_colored

parent 7bd6dd37
...@@ -137,6 +137,10 @@ class Win(object): ...@@ -137,6 +137,10 @@ class Win(object):
self._win.attron(curses.A_UNDERLINE) self._win.attron(curses.A_UNDERLINE)
elif char == 'b': elif char == 'b':
self._win.attron(curses.A_BOLD) self._win.attron(curses.A_BOLD)
# this will reset previous bold/uderline sequences if any was used
elif color_str: elif color_str:
self._win.attron(to_curses_attr((int(color_str), -1))) self._win.attron(to_curses_attr((int(color_str), -1)))
text = text[next_attr_char+len(color_str)+2:] text = text[next_attr_char+len(color_str)+2:]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment