Use a stack for last panes line windows, from Thomas Bertschinger in

GitHub issue 3588.
This commit is contained in:
nicm
2023-07-10 09:24:53 +00:00
parent b7e22d00b4
commit 8b3e2eab5a
7 changed files with 59 additions and 26 deletions

View File

@ -128,10 +128,8 @@ cmd_swap_pane_exec(struct cmd *self, struct cmdq_item *item)
window_set_active_pane(dst_w, src_wp, 1);
}
if (src_w != dst_w) {
if (src_w->last == src_wp)
src_w->last = NULL;
if (dst_w->last == dst_wp)
dst_w->last = NULL;
window_pane_stack_remove(&src_w->last_panes, src_wp);
window_pane_stack_remove(&dst_w->last_panes, dst_wp);
colour_palette_from_option(&src_wp->palette, src_wp->options);
colour_palette_from_option(&dst_wp->palette, dst_wp->options);
}