aboutsummaryrefslogtreecommitdiff
path: root/cmd-last-pane.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-last-pane.c')
-rw-r--r--cmd-last-pane.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/cmd-last-pane.c b/cmd-last-pane.c
index b59843b7..f9f61495 100644
--- a/cmd-last-pane.c
+++ b/cmd-last-pane.c
@@ -28,23 +28,22 @@ int cmd_last_pane_exec(struct cmd *, struct cmd_ctx *);
const struct cmd_entry cmd_last_pane_entry = {
"last-pane", "lastp",
+ "t:", 0, 0,
CMD_TARGET_WINDOW_USAGE,
- 0, "",
- cmd_target_init,
- cmd_target_parse,
- cmd_last_pane_exec,
- cmd_target_free,
- cmd_target_print
+ 0,
+ NULL,
+ NULL,
+ cmd_last_pane_exec
};
int
cmd_last_pane_exec(struct cmd *self, struct cmd_ctx *ctx)
{
- struct cmd_target_data *data = self->data;
- struct winlink *wl;
- struct window *w;
+ struct args *args = self->args;
+ struct winlink *wl;
+ struct window *w;
- if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL)
+ if ((wl = cmd_find_window(ctx, args_get(args, 't'), NULL)) == NULL)
return (-1);
w = wl->window;