diff options
author | nicm <nicm> | 2014-04-17 09:13:13 +0000 |
---|---|---|
committer | nicm <nicm> | 2014-04-17 09:13:13 +0000 |
commit | 2e98c9057de6c5700ca01bd58932373b103ef976 (patch) | |
tree | 49a1f04bf4e1e47c597ef7e1d053a4fc24db0595 /window.c | |
parent | 2740490e279bac7b01f18cc39aa59a5de09e3a95 (diff) | |
download | rtmux-2e98c9057de6c5700ca01bd58932373b103ef976.tar.gz rtmux-2e98c9057de6c5700ca01bd58932373b103ef976.tar.bz2 rtmux-2e98c9057de6c5700ca01bd58932373b103ef976.zip |
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.
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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); |