about summary refs log tree commit diff
path: root/color.c
diff options
context:
space:
mode:
Diffstat (limited to 'color.c')
-rw-r--r--color.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/color.c b/color.c
index f713451..dad5647 100644
--- a/color.c
+++ b/color.c
@@ -29,8 +29,9 @@ static uint32_t hashChar(uint32_t hash, char ch) {
 enum IRCColor colorGen(const char *str) {
 	if (!str) return IRCDefault;
 	uint32_t hash = 0;
-	for (; str[0]; ++str) {
-		hash = hashChar(hash, str[0]);
+	if (*str == '~') str++;
+	for (; *str; ++str) {
+		hash = hashChar(hash, *str);
 	}
 	while (IRCBlack == (hash & IRCLightGray)) {
 		hash = hashChar(hash, '\0');
-08 16:10:44 -0500'>2019-02-08Use set for parent in hiJune McEnroe 2019-02-08Switch back to semantic keyword grouping in hiJune McEnroe 2019-02-08Match only the basename in hiJune McEnroe 2019-02-07Add mdoc syntax to hiJune McEnroe 2019-02-07Support multi-line C macros in hiJune McEnroe 2019-02-07Detect .mk files as makeJune McEnroe 2019-02-07Add make syntax to hiJune McEnroe 2019-02-07Add IRC output to hiJune McEnroe 2019-02-07Improve C syntax accuracy and add Format classJune McEnroe 2019-02-07Factor out hi checkJune McEnroe Fix subexpression bounds check and compile pattends. 2019-02-07Add Escape class to hiJune McEnroe 2019-02-07Add Todo class and parent syntax constraintJune McEnroe