mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-17 00:51:36 +02:00
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:
@ -65,16 +65,7 @@ cmd_break_pane_exec(struct cmd *self, struct cmd_q *cmdq)
|
||||
server_unzoom_window(w);
|
||||
|
||||
TAILQ_REMOVE(&w->panes, wp, entry);
|
||||
if (wp == w->active) {
|
||||
w->active = w->last;
|
||||
w->last = NULL;
|
||||
if (w->active == NULL) {
|
||||
w->active = TAILQ_PREV(wp, window_panes, entry);
|
||||
if (w->active == NULL)
|
||||
w->active = TAILQ_NEXT(wp, entry);
|
||||
}
|
||||
} else if (wp == w->last)
|
||||
w->last = NULL;
|
||||
window_lost_pane(w, wp);
|
||||
layout_close_pane(wp);
|
||||
|
||||
w = wp->window = window_create1(s->sx, s->sy);
|
||||
|
Reference in New Issue
Block a user