mirror of
https://github.com/tmux/tmux.git
synced 2025-11-03 16:46:18 +00:00
Allow colour to be spelt as color, from Boris Verkhovsky. GitHub issue
2317.
This commit is contained in:
6
colour.c
6
colour.c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user