mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Add a "terminal" colour which can be used instead of "default" in style
options for the terminal default colour, bypassing any inheritance from other options. Prompted by a discussion with abieber@.
This commit is contained in:
9
colour.c
9
colour.c
@ -141,6 +141,8 @@ colour_tostring(int c)
|
||||
return ("white");
|
||||
case 8:
|
||||
return ("default");
|
||||
case 9:
|
||||
return ("terminal");
|
||||
case 90:
|
||||
return ("brightblack");
|
||||
case 91:
|
||||
@ -188,6 +190,11 @@ colour_fromstring(const char *s)
|
||||
return (n | COLOUR_FLAG_256);
|
||||
}
|
||||
|
||||
if (strcasecmp(s, "default") == 0)
|
||||
return (8);
|
||||
if (strcasecmp(s, "terminal") == 0)
|
||||
return (9);
|
||||
|
||||
if (strcasecmp(s, "black") == 0 || strcmp(s, "0") == 0)
|
||||
return (0);
|
||||
if (strcasecmp(s, "red") == 0 || strcmp(s, "1") == 0)
|
||||
@ -204,8 +211,6 @@ colour_fromstring(const char *s)
|
||||
return (6);
|
||||
if (strcasecmp(s, "white") == 0 || strcmp(s, "7") == 0)
|
||||
return (7);
|
||||
if (strcasecmp(s, "default") == 0 || strcmp(s, "8") == 0)
|
||||
return (8);
|
||||
if (strcasecmp(s, "brightblack") == 0 || strcmp(s, "90") == 0)
|
||||
return (90);
|
||||
if (strcasecmp(s, "brightred") == 0 || strcmp(s, "91") == 0)
|
||||
|
Reference in New Issue
Block a user