Correct the dance to fix the active pane in join-pane by pulling the

(right) code from break-pane and window_remove_pane into a helper
function.
This commit is contained in:
nicm
2014-04-17 09:13:13 +00:00
parent 2740490e27
commit 2e98c9057d
4 changed files with 10 additions and 16 deletions

View File

@ -139,11 +139,7 @@ join_pane(struct cmd *self, struct cmd_q *cmdq, int not_same_window)
layout_close_pane(src_wp);
if (src_w->active == src_wp) {
src_w->active = TAILQ_PREV(src_wp, window_panes, entry);
if (src_w->active == NULL)
src_w->active = TAILQ_NEXT(src_wp, entry);
}
window_lost_pane(src_w, src_wp);
TAILQ_REMOVE(&src_w->panes, src_wp, entry);
if (window_count_panes(src_w) == 0)