Insert joined pane before the target pane with -b, like for split. From

Takeshi Banse.
pull/2546/head
nicm 2021-01-06 07:32:23 +00:00
parent ccb8b9eb2a
commit 199689954b
1 changed files with 4 additions and 1 deletions

View File

@ -143,7 +143,10 @@ cmd_join_pane_exec(struct cmd *self, struct cmdq_item *item)
src_wp->window = dst_w;
options_set_parent(src_wp->options, dst_w->options);
src_wp->flags |= PANE_STYLECHANGED;
TAILQ_INSERT_AFTER(&dst_w->panes, dst_wp, src_wp, entry);
if (flags & SPAWN_BEFORE)
TAILQ_INSERT_BEFORE(dst_wp, src_wp, entry);
else
TAILQ_INSERT_AFTER(&dst_w->panes, dst_wp, src_wp, entry);
layout_assign_pane(lc, src_wp);
recalculate_sizes();