Reset the bold and underline attribute when absent, in addstr_colored
This commit is contained in:
parent
7bd6dd37c2
commit
160693711d
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||||
|
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:
|
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:]
|
||||||
|
|
Loading…
Reference in a new issue