diff options
author | 2014-04-17 09:13:13 +0000 | |
---|---|---|
committer | 2014-04-17 09:13:13 +0000 | |
commit | e2f09fc8cd53ff4e1843a1d7b16b6c2bc87e41fb (patch) | |
tree | 82b699bb08cc457646a2e8b68ae0de4c60c16419 /usr.bin/tmux/cmd-break-pane.c | |
parent | It's been a quarter century: we can assume volatile is present with that name. (diff) | |
download | wireguard-openbsd-e2f09fc8cd53ff4e1843a1d7b16b6c2bc87e41fb.tar.xz wireguard-openbsd-e2f09fc8cd53ff4e1843a1d7b16b6c2bc87e41fb.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 'usr.bin/tmux/cmd-break-pane.c')
-rw-r--r-- | usr.bin/tmux/cmd-break-pane.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/usr.bin/tmux/cmd-break-pane.c b/usr.bin/tmux/cmd-break-pane.c index 8186cb3f211..a4d63da717a 100644 --- a/usr.bin/tmux/cmd-break-pane.c +++ b/usr.bin/tmux/cmd-break-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-break-pane.c,v 1.22 2013/10/10 12:00:18 nicm Exp $ */ +/* $OpenBSD: cmd-break-pane.c,v 1.23 2014/04/17 09:13:13 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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); |