Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2017-01-14 20:01:13 +00:00
commit 4f077fe62c

View File

@ -49,13 +49,6 @@ cmd_kill_pane_exec(struct cmd *self, struct cmdq_item *item)
server_unzoom_window(wl->window);
if (window_count_panes(wl->window) == 1) {
/* Only one pane, kill the window. */
server_kill_window(wl->window);
recalculate_sizes();
return (CMD_RETURN_NORMAL);
}
if (args_has(self->args, 'a')) {
TAILQ_FOREACH_SAFE(loopwp, &wl->window->panes, entry, tmpwp) {
if (loopwp == wp)
@ -63,11 +56,16 @@ cmd_kill_pane_exec(struct cmd *self, struct cmdq_item *item)
layout_close_pane(loopwp);
window_remove_pane(wl->window, loopwp);
}
return (CMD_RETURN_NORMAL);
}
if (window_count_panes(wl->window) == 1) {
server_kill_window(wl->window);
recalculate_sizes();
} else {
layout_close_pane(wp);
window_remove_pane(wl->window, wp);
server_redraw_window(wl->window);
}
server_redraw_window(wl->window);
return (CMD_RETURN_NORMAL);
}