mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 04:27:00 +00:00
Allow uppercase letters in gray/grey color names, GitHub issue 4560 from
Pavel Roskin.
This commit is contained in:
3
colour.c
3
colour.c
@ -986,7 +986,8 @@ colour_byname(const char *name)
|
|||||||
int c;
|
int c;
|
||||||
const char *errstr;
|
const char *errstr;
|
||||||
|
|
||||||
if (strncmp(name, "grey", 4) == 0 || strncmp(name, "gray", 4) == 0) {
|
if (strncasecmp(name, "grey", 4) == 0 ||
|
||||||
|
strncasecmp(name, "gray", 4) == 0) {
|
||||||
if (name[4] == '\0')
|
if (name[4] == '\0')
|
||||||
return (0xbebebe|COLOUR_FLAG_RGB);
|
return (0xbebebe|COLOUR_FLAG_RGB);
|
||||||
c = strtonum(name + 4, 0, 100, &errstr);
|
c = strtonum(name + 4, 0, 100, &errstr);
|
||||||
|
Reference in New Issue
Block a user