Allow colour to be spelt as color, from Boris Verkhovsky. GitHub issue

2317.
This commit is contained in:
nicm
2020-08-25 11:35:32 +00:00
parent e4a4fcfc90
commit 20fcdcfea1
4 changed files with 52 additions and 13 deletions

View File

@ -189,6 +189,12 @@ colour_fromstring(const char *s)
return (-1);
return (n | COLOUR_FLAG_256);
}
if (strncasecmp(s, "color", (sizeof "color") - 1) == 0) {
n = strtonum(s + (sizeof "color") - 1, 0, 255, &errstr);
if (errstr != NULL)
return (-1);
return (n | COLOUR_FLAG_256);
}
if (strcasecmp(s, "default") == 0)
return (8);