summaryrefslogtreecommitdiff
path: root/src/windows.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/windows.py')
-rw-r--r--src/windows.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/windows.py b/src/windows.py
index f399d940..9fa3e705 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -135,7 +135,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:]