summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-respawn-pane.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-04-22 10:22:40 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-04-22 10:22:40 +0000
commit3b5031a1e691e18e1bbe892b262d81db17887237 (patch)
tree280122dc6016981c484998db1ba10afbfdadb998 /usr.bin/tmux/cmd-respawn-pane.c
parent61be04363b84fafcbfe17c4d58547b1ca814e2c7 (diff)
Get rid of the extra layer of flags and cmd_prepare() and just store the
CMD_FIND_* flags in the cmd_entry and call it for the command. Commands with special requirements call it themselves and update the target for hooks to use.
Diffstat (limited to 'usr.bin/tmux/cmd-respawn-pane.c')
-rw-r--r--usr.bin/tmux/cmd-respawn-pane.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/tmux/cmd-respawn-pane.c b/usr.bin/tmux/cmd-respawn-pane.c
index fb16ca41759..7dac2b9fdf7 100644
--- a/usr.bin/tmux/cmd-respawn-pane.c
+++ b/usr.bin/tmux/cmd-respawn-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-respawn-pane.c,v 1.23 2017/03/09 17:02:38 nicm Exp $ */
+/* $OpenBSD: cmd-respawn-pane.c,v 1.24 2017/04/22 10:22:39 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -37,7 +37,7 @@ const struct cmd_entry cmd_respawn_pane_entry = {
.args = { "kt:", 0, -1 },
.usage = "[-k] " CMD_TARGET_PANE_USAGE " [command]",
- .tflag = CMD_PANE,
+ .target = { 't', CMD_FIND_PANE, 0 },
.flags = 0,
.exec = cmd_respawn_pane_exec
@@ -47,10 +47,10 @@ static enum cmd_retval
cmd_respawn_pane_exec(struct cmd *self, struct cmdq_item *item)
{
struct args *args = self->args;
- struct winlink *wl = item->state.tflag.wl;
+ struct winlink *wl = item->target.wl;
struct window *w = wl->window;
- struct window_pane *wp = item->state.tflag.wp;
- struct session *s = item->state.tflag.s;
+ struct window_pane *wp = item->target.wp;
+ struct session *s = item->target.s;
struct environ *env;
const char *path;
char *cause;