mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Reset last pane properly when using break-pane as well, fixes a problem
reported to Debian by Hannes von Haugwitz (bug 622677).
This commit is contained in:
parent
583c885d68
commit
ec3efab01e
@ -57,12 +57,18 @@ cmd_break_pane_exec(struct cmd *self, struct cmd_ctx *ctx)
|
|||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
TAILQ_REMOVE(&wl->window->panes, wp, entry);
|
w = wl->window;
|
||||||
if (wl->window->active == wp) {
|
TAILQ_REMOVE(&w->panes, wp, entry);
|
||||||
wl->window->active = TAILQ_PREV(wp, window_panes, entry);
|
if (wp == w->active) {
|
||||||
if (wl->window->active == NULL)
|
w->active = w->last;
|
||||||
wl->window->active = TAILQ_NEXT(wp, entry);
|
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;
|
||||||
layout_close_pane(wp);
|
layout_close_pane(wp);
|
||||||
|
|
||||||
w = wp->window = window_create1(s->sx, s->sy);
|
w = wp->window = window_create1(s->sx, s->sy);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user