mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Add noattr and use in mode-style to allow whether attributes are ignored
or used to be configured. GitHub issue 4498.
This commit is contained in:
@ -1103,7 +1103,7 @@ const struct options_table_entry options_table[] = {
|
|||||||
.type = OPTIONS_TABLE_STRING,
|
.type = OPTIONS_TABLE_STRING,
|
||||||
.scope = OPTIONS_TABLE_WINDOW,
|
.scope = OPTIONS_TABLE_WINDOW,
|
||||||
.flags = OPTIONS_TABLE_IS_STYLE,
|
.flags = OPTIONS_TABLE_IS_STYLE,
|
||||||
.default_str = "bg=yellow,fg=black",
|
.default_str = "noattr,bg=yellow,fg=black",
|
||||||
.separator = ",",
|
.separator = ",",
|
||||||
.text = "Style of indicators and highlighting in modes."
|
.text = "Style of indicators and highlighting in modes."
|
||||||
},
|
},
|
||||||
|
3
screen.c
3
screen.c
@ -577,8 +577,7 @@ screen_select_cell(struct screen *s, struct grid_cell *dst,
|
|||||||
if (COLOUR_DEFAULT(dst->bg))
|
if (COLOUR_DEFAULT(dst->bg))
|
||||||
dst->bg = src->bg;
|
dst->bg = src->bg;
|
||||||
utf8_copy(&dst->data, &src->data);
|
utf8_copy(&dst->data, &src->data);
|
||||||
dst->attr = dst->attr & ~GRID_ATTR_CHARSET;
|
dst->attr = src->attr;
|
||||||
dst->attr |= src->attr & GRID_ATTR_CHARSET;
|
|
||||||
dst->flags = src->flags;
|
dst->flags = src->flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
style.c
4
style.c
@ -217,7 +217,9 @@ style_parse(struct style *sy, const struct grid_cell *base, const char *in)
|
|||||||
} else if (strcasecmp(tmp, "none") == 0)
|
} else if (strcasecmp(tmp, "none") == 0)
|
||||||
sy->gc.attr = 0;
|
sy->gc.attr = 0;
|
||||||
else if (end > 2 && strncasecmp(tmp, "no", 2) == 0) {
|
else if (end > 2 && strncasecmp(tmp, "no", 2) == 0) {
|
||||||
if ((value = attributes_fromstring(tmp + 2)) == -1)
|
if (strcmp(tmp + 2, "attr") == 0)
|
||||||
|
value = 0xffff & ~GRID_ATTR_CHARSET;
|
||||||
|
else if ((value = attributes_fromstring(tmp + 2)) == -1)
|
||||||
goto error;
|
goto error;
|
||||||
sy->gc.attr &= ~value;
|
sy->gc.attr &= ~value;
|
||||||
} else if (end > 6 && strncasecmp(tmp, "width=", 6) == 0) {
|
} else if (end > 6 && strncasecmp(tmp, "width=", 6) == 0) {
|
||||||
|
2
tmux.1
2
tmux.1
@ -6305,6 +6305,8 @@ and
|
|||||||
.Ic list=right-marker
|
.Ic list=right-marker
|
||||||
mark the text to be used to mark that text has been trimmed from the left or
|
mark the text to be used to mark that text has been trimmed from the left or
|
||||||
right of the list if there is not enough space.
|
right of the list if there is not enough space.
|
||||||
|
.It Ic noattr
|
||||||
|
Do not copy attributes from the default style.
|
||||||
.It Xo Ic push-default ,
|
.It Xo Ic push-default ,
|
||||||
.Ic pop-default
|
.Ic pop-default
|
||||||
.Xc
|
.Xc
|
||||||
|
Reference in New Issue
Block a user