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.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.bin/tmux/cmd-kill-pane.c b/usr.bin/tmux/cmd-kill-pane.c
index 951095afc71..3d0d721cfce 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.16 2014/10/20 22:29:25 nicm Exp $ */
+/* $OpenBSD: cmd-kill-pane.c,v 1.17 2015/12/13 14:32:38 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -32,19 +32,16 @@ const struct cmd_entry cmd_kill_pane_entry = {
"kill-pane", "killp",
"at:", 0, 0,
"[-a] " CMD_TARGET_PANE_USAGE,
- 0,
+ CMD_PANE_T,
cmd_kill_pane_exec
};
enum cmd_retval
cmd_kill_pane_exec(struct cmd *self, struct cmd_q *cmdq)
{
- struct args *args = self->args;
- struct winlink *wl;
- struct window_pane *loopwp, *tmpwp, *wp;
+ struct winlink *wl = cmdq->state.tflag.wl;
+ struct window_pane *loopwp, *tmpwp, *wp = cmdq->state.tflag.wp;
- if ((wl = cmd_find_pane(cmdq, args_get(args, 't'), NULL, &wp)) == NULL)
- return (CMD_RETURN_ERROR);
server_unzoom_window(wl->window);
if (window_count_panes(wl->window) == 1) {