summaryrefslogtreecommitdiff
path: root/src/fe-common/core/hilight-text.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-01-31 20:53:09 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-01-31 20:53:09 +0000
commit9044226d6e70fd72ec86e71b069540860855e9ae (patch)
tree25c7ad2edf3260592db893629044f761588feac0 /src/fe-common/core/hilight-text.c
parentb24243e45af87455b2fdfdfba545e06871aefca9 (diff)
downloadirssi-9044226d6e70fd72ec86e71b069540860855e9ae.zip
Print the color hilight with two digits so it won't accidentally use the
next char if it's numeric. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1174 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core/hilight-text.c')
-rw-r--r--src/fe-common/core/hilight-text.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fe-common/core/hilight-text.c b/src/fe-common/core/hilight-text.c
index 5c80bd4b..52fcb056 100644
--- a/src/fe-common/core/hilight-text.c
+++ b/src/fe-common/core/hilight-text.c
@@ -313,7 +313,10 @@ char *hilight_get_color(HILIGHT_REC *rec, int activity)
color = number;
}
- return g_strconcat(isdigit(*color) ? "\003" : "", color, NULL);
+ if (is_numeric(color, 0))
+ return g_strdup_printf("\003%02d", atoi(color));
+
+ return g_strdup(color);
}
static void hilight_update_text_dest(TEXT_DEST_REC *dest, HILIGHT_REC *rec)