Make status hilites use same color string matching as menucolors

This commit is contained in:
Pasi Kallinen
2016-01-13 20:24:40 +02:00
parent c49490dfd4
commit 1dd37b7fca
4 changed files with 26 additions and 26 deletions

View File

@@ -1214,21 +1214,10 @@ boolean from_configfile;
} else if (strcmpi(how, "normal") == 0) {
normal[i] = TRUE;
} else {
int k;
char colorname[BUFSZ];
for (k = 0; k < CLR_MAX; ++k) {
/* we have to make a copy to change space to dash */
(void) strcpy(colorname, c_obj_colors[k]);
for (tmp = index(colorname, ' '); tmp;
tmp = index(colorname, ' '))
*tmp = '-';
if (strcmpi(how, colorname) == 0) {
coloridx[i] = k;
break;
}
}
int k = match_str2clr(how);
if (k >= CLR_MAX)
return FALSE;
coloridx[i] = k;
}
}