diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-04-27 15:15:12 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-04-27 15:15:12 +0100 |
commit | 79b4d839521c154c39d7f86932f7dd4a7b870576 (patch) | |
tree | 3db3984808a7e08790ae459be218a3238d144c4f /tty.c | |
parent | c30e765c7b4659b472d2830bd2f114560a5205df (diff) | |
download | rtmux-79b4d839521c154c39d7f86932f7dd4a7b870576.tar.gz rtmux-79b4d839521c154c39d7f86932f7dd4a7b870576.tar.bz2 rtmux-79b4d839521c154c39d7f86932f7dd4a7b870576.zip |
Use a grid cell not a style for the pane style.
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 24 |
1 files changed, 8 insertions, 16 deletions
@@ -2690,27 +2690,19 @@ static void tty_default_colours(struct grid_cell *gc, struct window_pane *wp) { struct options *oo = wp->options; - struct style *style, *active_style; int c; if (wp->flags & PANE_STYLECHANGED) { wp->flags &= ~PANE_STYLECHANGED; - - active_style = options_get_style(oo, "window-active-style"); - style = options_get_style(oo, "window-style"); - - style_copy(&wp->cached_active_style, active_style); - style_copy(&wp->cached_style, style); - } else { - active_style = &wp->cached_active_style; - style = &wp->cached_style; + style_apply(&wp->cached_active_gc, oo, "window-active-style"); + style_apply(&wp->cached_gc, oo, "window-style"); } if (gc->fg == 8) { - if (wp == wp->window->active && active_style->gc.fg != 8) - gc->fg = active_style->gc.fg; + if (wp == wp->window->active && wp->cached_active_gc.fg != 8) + gc->fg = wp->cached_active_gc.fg; else - gc->fg = style->gc.fg; + gc->fg = wp->cached_gc.fg; if (gc->fg != 8) { c = window_pane_get_palette(wp, gc->fg); @@ -2720,10 +2712,10 @@ tty_default_colours(struct grid_cell *gc, struct window_pane *wp) } if (gc->bg == 8) { - if (wp == wp->window->active && active_style->gc.bg != 8) - gc->bg = active_style->gc.bg; + if (wp == wp->window->active && wp->cached_active_gc.bg != 8) + gc->bg = wp->cached_active_gc.bg; else - gc->bg = style->gc.bg; + gc->bg = wp->cached_gc.bg; if (gc->bg != 8) { c = window_pane_get_palette(wp, gc->bg); |