mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-26 21:08:20 +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:
8
window.c
8
window.c
@@ -591,7 +591,7 @@ window_add_pane(struct window *w, u_int hlimit)
|
||||
}
|
||||
|
||||
void
|
||||
window_remove_pane(struct window *w, struct window_pane *wp)
|
||||
window_lost_pane(struct window *w, struct window_pane *wp)
|
||||
{
|
||||
if (wp == w->active) {
|
||||
w->active = w->last;
|
||||
@@ -603,6 +603,12 @@ window_remove_pane(struct window *w, struct window_pane *wp)
|
||||
}
|
||||
} else if (wp == w->last)
|
||||
w->last = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
window_remove_pane(struct window *w, struct window_pane *wp)
|
||||
{
|
||||
window_lost_pane(w, wp);
|
||||
|
||||
TAILQ_REMOVE(&w->panes, wp, entry);
|
||||
window_pane_destroy(wp);
|
||||
|
Reference in New Issue
Block a user