summaryrefslogtreecommitdiff
path: root/Src/Modules/hlgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Modules/hlgroup.c')
-rw-r--r--Src/Modules/hlgroup.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/Src/Modules/hlgroup.c b/Src/Modules/hlgroup.c
index 082762623..6c5a4bec4 100644
--- a/Src/Modules/hlgroup.c
+++ b/Src/Modules/hlgroup.c
@@ -50,9 +50,14 @@ convertattr(char *attrstr, int sgr)
char *c = s, *t = s - 1;
while (c[0] == '\033' && c[1] == '[') {
- c += 2;
- while (isdigit(*c) || *c == ';')
- *++t = *c++;
+ for (c += 2; ; c++) {
+ if (isdigit(*c))
+ *++t = *c;
+ else if (*c == ';' || *c == ':')
+ *++t = ';';
+ else
+ break;
+ }
t++;
if (*c != 'm')
break;