diff options
Diffstat (limited to 'cmd-previous-layout.c')
-rw-r--r-- | cmd-previous-layout.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/cmd-previous-layout.c b/cmd-previous-layout.c index 77e3ebbb..abe9e357 100644 --- a/cmd-previous-layout.c +++ b/cmd-previous-layout.c @@ -28,23 +28,22 @@ int cmd_previous_layout_exec(struct cmd *, struct cmd_ctx *); const struct cmd_entry cmd_previous_layout_entry = { "previous-layout", "prevl", + "t:", 0, 0, CMD_TARGET_WINDOW_USAGE, - 0, "", - cmd_target_init, - cmd_target_parse, - cmd_previous_layout_exec, - cmd_target_free, - cmd_target_print + 0, + NULL, + NULL, + cmd_previous_layout_exec }; int cmd_previous_layout_exec(struct cmd *self, struct cmd_ctx *ctx) { - struct cmd_target_data *data = self->data; - struct winlink *wl; - u_int layout; + struct args *args = self->args; + struct winlink *wl; + u_int layout; - if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL) + if ((wl = cmd_find_window(ctx, args_get(args, 't'), NULL)) == NULL) return (-1); layout = layout_set_previous(wl->window); |