From: nicm Date: Tue, 17 Jan 2023 06:50:55 +0000 (+0000) Subject: Update palette when moving a pane, GitHub issue 3437. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=bf31d21b53c34d82f0b2275e5dd5913ba58ceef3;p=openbsd Update palette when moving a pane, GitHub issue 3437. --- diff --git a/usr.bin/tmux/cmd-break-pane.c b/usr.bin/tmux/cmd-break-pane.c index a24c85bd35e..ba494e598b6 100644 --- a/usr.bin/tmux/cmd-break-pane.c +++ b/usr.bin/tmux/cmd-break-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-break-pane.c,v 1.60 2021/08/21 10:22:38 nicm Exp $ */ +/* $OpenBSD: cmd-break-pane.c,v 1.61 2023/01/17 06:50:55 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -115,6 +115,7 @@ cmd_break_pane_exec(struct cmd *self, struct cmdq_item *item) layout_init(w, wp); wp->flags |= PANE_CHANGED; + colour_palette_from_option(&wp->palette, wp->options); if (idx == -1) idx = -1 - options_get_number(dst_s->options, "base-index"); diff --git a/usr.bin/tmux/cmd-join-pane.c b/usr.bin/tmux/cmd-join-pane.c index 12549f2fba6..9824fedbe4d 100644 --- a/usr.bin/tmux/cmd-join-pane.c +++ b/usr.bin/tmux/cmd-join-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-join-pane.c,v 1.50 2022/06/07 10:02:19 nicm Exp $ */ +/* $OpenBSD: cmd-join-pane.c,v 1.51 2023/01/17 06:50:55 nicm Exp $ */ /* * Copyright (c) 2011 George Nachman @@ -156,6 +156,7 @@ cmd_join_pane_exec(struct cmd *self, struct cmdq_item *item) else TAILQ_INSERT_AFTER(&dst_w->panes, dst_wp, src_wp, entry); layout_assign_pane(lc, src_wp, 0); + colour_palette_from_option(&src_wp->palette, src_wp->options); recalculate_sizes(); diff --git a/usr.bin/tmux/cmd-swap-pane.c b/usr.bin/tmux/cmd-swap-pane.c index 77358102daa..0cc451776f6 100644 --- a/usr.bin/tmux/cmd-swap-pane.c +++ b/usr.bin/tmux/cmd-swap-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-swap-pane.c,v 1.41 2022/05/30 12:54:09 nicm Exp $ */ +/* $OpenBSD: cmd-swap-pane.c,v 1.42 2023/01/17 06:50:55 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -132,6 +132,8 @@ cmd_swap_pane_exec(struct cmd *self, struct cmdq_item *item) src_w->last = NULL; if (dst_w->last == dst_wp) dst_w->last = NULL; + colour_palette_from_option(&src_wp->palette, src_wp->options); + colour_palette_from_option(&dst_wp->palette, dst_wp->options); } server_redraw_window(src_w); server_redraw_window(dst_w);