summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/windows.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/windows.py b/src/windows.py
index 790dd858..1ff8f858 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -138,7 +138,8 @@ class Win(object):
self._win.attron(curses.A_BOLD)
if attr_char in string.digits and attr_char != '':
color_str = text[next_attr_char+1:text.find('}', next_attr_char)]
- self._win.attron(to_curses_attr((int(color_str), -1)))
+ if color_str:
+ self._win.attron(to_curses_attr((int(color_str), -1)))
text = text[next_attr_char+len(color_str)+2:]
else:
text = text[next_attr_char+2:]