diff options
author | 2020-05-16 14:53:23 +0000 | |
---|---|---|
committer | 2020-05-16 14:53:23 +0000 | |
commit | bf46d0ce190fe6df7f1df69233f5f243cc29b70c (patch) | |
tree | b5827891926a6ed22da8dab194565c3e2011db8c /usr.bin/tmux/window.c | |
parent | Instead of forbidding invalid session names, sanitize them like window (diff) | |
download | wireguard-openbsd-bf46d0ce190fe6df7f1df69233f5f243cc29b70c.tar.xz wireguard-openbsd-bf46d0ce190fe6df7f1df69233f5f243cc29b70c.zip |
Use a grid cell not a style for the pane style.
Diffstat (limited to 'usr.bin/tmux/window.c')
-rw-r--r-- | usr.bin/tmux/window.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c index 9e14d527569..2e4506ab8eb 100644 --- a/usr.bin/tmux/window.c +++ b/usr.bin/tmux/window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.257 2020/04/13 20:51:57 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.258 2020/05/16 14:53:23 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -488,8 +488,8 @@ window_set_active_pane(struct window *w, struct window_pane *wp, int notify) void window_redraw_active_switch(struct window *w, struct window_pane *wp) { - struct style *sy1, *sy2; - int c1, c2; + struct grid_cell *gc1, *gc2; + int c1, c2; if (wp == w->active) return; @@ -499,18 +499,18 @@ window_redraw_active_switch(struct window *w, struct window_pane *wp) * If the active and inactive styles or palettes are different, * need to redraw the panes. */ - sy1 = &wp->cached_style; - sy2 = &wp->cached_active_style; - if (!style_equal(sy1, sy2)) + gc1 = &wp->cached_gc; + gc2 = &wp->cached_active_gc; + if (!grid_cells_look_equal(gc1, gc2)) wp->flags |= PANE_REDRAW; else { - c1 = window_pane_get_palette(wp, sy1->gc.fg); - c2 = window_pane_get_palette(wp, sy2->gc.fg); + c1 = window_pane_get_palette(wp, gc1->fg); + c2 = window_pane_get_palette(wp, gc2->fg); if (c1 != c2) wp->flags |= PANE_REDRAW; else { - c1 = window_pane_get_palette(wp, sy1->gc.bg); - c2 = window_pane_get_palette(wp, sy2->gc.bg); + c1 = window_pane_get_palette(wp, gc1->bg); + c2 = window_pane_get_palette(wp, gc2->bg); if (c1 != c2) wp->flags |= PANE_REDRAW; } |