Add push-default and pop-default in styles to change the default colours

and attributes and use them to restore the previous behaviour of
window-status-style being the default for window-status-format in the
status line. From John Drouhard in GitHub issue 1912.
This commit is contained in:
nicm
2019-09-15 21:42:57 +00:00
parent a23ce1b45f
commit 63e07b245f
5 changed files with 65 additions and 28 deletions

11
tmux.h
View File

@ -680,6 +680,13 @@ struct style_range {
};
TAILQ_HEAD(style_ranges, style_range);
/* Style default. */
enum style_default_type {
STYLE_DEFAULT_BASE,
STYLE_DEFAULT_PUSH,
STYLE_DEFAULT_POP
};
/* Style option. */
struct style {
struct grid_cell gc;
@ -690,6 +697,8 @@ struct style {
enum style_range_type range_type;
u_int range_argument;
enum style_default_type default_type;
};
/* Virtual screen. */
@ -2648,8 +2657,6 @@ int style_parse(struct style *,const struct grid_cell *,
const char *style_tostring(struct style *);
void style_apply(struct grid_cell *, struct options *,
const char *);
void style_apply_update(struct grid_cell *, struct options *,
const char *);
int style_equal(struct style *, struct style *);
void style_set(struct style *, const struct grid_cell *);
void style_copy(struct style *, struct style *);