summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-last-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd-last-window.c')
-rw-r--r--usr.bin/tmux/cmd-last-window.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/usr.bin/tmux/cmd-last-window.c b/usr.bin/tmux/cmd-last-window.c
index af07a556ead..1fcd3044f4d 100644
--- a/usr.bin/tmux/cmd-last-window.c
+++ b/usr.bin/tmux/cmd-last-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-last-window.c,v 1.4 2009/11/13 19:53:29 nicm Exp $ */
+/* $OpenBSD: cmd-last-window.c,v 1.5 2011/01/04 00:42:46 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -28,22 +28,21 @@ int cmd_last_window_exec(struct cmd *, struct cmd_ctx *);
const struct cmd_entry cmd_last_window_entry = {
"last-window", "last",
+ "t:", 0, 0,
CMD_TARGET_SESSION_USAGE,
- 0, "",
- cmd_target_init,
- cmd_target_parse,
- cmd_last_window_exec,
- cmd_target_free,
- cmd_target_print
+ 0,
+ NULL,
+ NULL,
+ cmd_last_window_exec
};
int
cmd_last_window_exec(struct cmd *self, struct cmd_ctx *ctx)
{
- struct cmd_target_data *data = self->data;
- struct session *s;
+ struct args *args = self->args;
+ struct session *s;
- if ((s = cmd_find_session(ctx, data->target)) == NULL)
+ if ((s = cmd_find_session(ctx, args_get(args, 't'))) == NULL)
return (-1);
if (session_last(s) == 0)