summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-kill-pane.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd-kill-pane.c')
-rw-r--r--usr.bin/tmux/cmd-kill-pane.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/usr.bin/tmux/cmd-kill-pane.c b/usr.bin/tmux/cmd-kill-pane.c
index c2bde0479fa..7652444bcf9 100644
--- a/usr.bin/tmux/cmd-kill-pane.c
+++ b/usr.bin/tmux/cmd-kill-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-kill-pane.c,v 1.25 2017/04/22 10:22:39 nicm Exp $ */
+/* $OpenBSD: cmd-kill-pane.c,v 1.26 2018/04/10 10:48:44 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -47,9 +47,8 @@ cmd_kill_pane_exec(struct cmd *self, struct cmdq_item *item)
struct winlink *wl = item->target.wl;
struct window_pane *loopwp, *tmpwp, *wp = item->target.wp;
- server_unzoom_window(wl->window);
-
if (args_has(self->args, 'a')) {
+ server_unzoom_window(wl->window);
TAILQ_FOREACH_SAFE(loopwp, &wl->window->panes, entry, tmpwp) {
if (loopwp == wp)
continue;
@@ -60,13 +59,6 @@ cmd_kill_pane_exec(struct cmd *self, struct cmdq_item *item)
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_kill_pane(wp);
return (CMD_RETURN_NORMAL);
}