diff options
author | nicm <nicm> | 2021-08-12 19:47:05 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-08-12 19:47:05 +0000 |
commit | 9b004728202d03241009ef5f73980909e9234bc4 (patch) | |
tree | 6492c6e6a97837a1e8cc66d910303177598850e6 /tty.c | |
parent | 5d451551b6457d972897fa60b3dba38e13d6589f (diff) | |
download | rtmux-9b004728202d03241009ef5f73980909e9234bc4.tar.gz rtmux-9b004728202d03241009ef5f73980909e9234bc4.tar.bz2 rtmux-9b004728202d03241009ef5f73980909e9234bc4.zip |
Evaluate styles with the pane variables.
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -2790,18 +2790,23 @@ tty_window_default_style(struct grid_cell *gc, struct window_pane *wp) void tty_default_colours(struct grid_cell *gc, struct window_pane *wp) { - struct options *oo = wp->options; + struct options *oo = wp->options; + struct format_tree *ft; memcpy(gc, &grid_default_cell, sizeof *gc); if (wp->flags & PANE_STYLECHANGED) { + log_debug("%%%u: style changed", wp->id); wp->flags &= ~PANE_STYLECHANGED; + ft = format_create(NULL, NULL, FORMAT_PANE|wp->id, + FORMAT_NOJOBS); + format_defaults(ft, NULL, NULL, NULL, wp); tty_window_default_style(&wp->cached_active_gc, wp); - style_add(&wp->cached_active_gc, oo, "window-active-style", - NULL); + style_add(&wp->cached_active_gc, oo, "window-active-style", ft); tty_window_default_style(&wp->cached_gc, wp); - style_add(&wp->cached_gc, oo, "window-style", NULL); + style_add(&wp->cached_gc, oo, "window-style", ft); + format_free(ft); } if (gc->fg == 8) { |