aboutsummaryrefslogtreecommitdiff
path: root/cmd-break-pane.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-break-pane.c')
-rw-r--r--cmd-break-pane.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/cmd-break-pane.c b/cmd-break-pane.c
index defd22ec..85c5d4d9 100644
--- a/cmd-break-pane.c
+++ b/cmd-break-pane.c
@@ -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);