version 1.1, 2010/10/23 13:04:34 |
version 1.2, 2011/01/04 00:42:46 |
|
|
|
|
const struct cmd_entry cmd_last_pane_entry = { |
const struct cmd_entry cmd_last_pane_entry = { |
"last-pane", "lastp", |
"last-pane", "lastp", |
|
"t:", 0, 0, |
CMD_TARGET_WINDOW_USAGE, |
CMD_TARGET_WINDOW_USAGE, |
0, "", |
0, |
cmd_target_init, |
NULL, |
cmd_target_parse, |
NULL, |
cmd_last_pane_exec, |
cmd_last_pane_exec |
cmd_target_free, |
|
cmd_target_print |
|
}; |
}; |
|
|
int |
int |
cmd_last_pane_exec(struct cmd *self, struct cmd_ctx *ctx) |
cmd_last_pane_exec(struct cmd *self, struct cmd_ctx *ctx) |
{ |
{ |
struct cmd_target_data *data = self->data; |
struct args *args = self->args; |
struct winlink *wl; |
struct winlink *wl; |
struct window *w; |
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); |
return (-1); |
w = wl->window; |
w = wl->window; |
|
|