summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2016-07-14 12:26:31 +0200
committermathieui <mathieui@mathieui.net>2016-07-14 12:26:31 +0200
commit275a67864dad282271e9b3b3fdcf5ec33c98be87 (patch)
tree07aea9bf5ba5916032eba03969cfc227614f0173
parent05fa56aea5695b676c4d4f815c008f2ae0698a30 (diff)
downloadpoezio-275a67864dad282271e9b3b3fdcf5ec33c98be87.tar.gz
poezio-275a67864dad282271e9b3b3fdcf5ec33c98be87.tar.bz2
poezio-275a67864dad282271e9b3b3fdcf5ec33c98be87.tar.xz
poezio-275a67864dad282271e9b3b3fdcf5ec33c98be87.zip
Fix a bug in multiline colored text
if the first, attribute color was negative, the color wasn’t passed on to the next line.
-rw-r--r--poezio/windows/funcs.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/poezio/windows/funcs.py b/poezio/windows/funcs.py
index 949a46cd..9d596bcc 100644
--- a/poezio/windows/funcs.py
+++ b/poezio/windows/funcs.py
@@ -3,6 +3,7 @@ Standalone functions used by the modules
"""
import string
+DIGITS = string.digits + '-'
from poezio.windows.base_wins import FORMAT_CHAR, format_chars
@@ -42,7 +43,7 @@ def parse_attrs(text, previous=None):
attrs.append('u')
elif attr_char == 'b':
attrs.append('b')
- if attr_char in string.digits and attr_char:
+ if attr_char in DIGITS and attr_char:
color_str = text[next_attr_char+1:text.find('}', next_attr_char)]
if color_str:
attrs.append(color_str + '}')