version 1.3, 2012/07/10 11:53:01 |
version 1.4, 2012/07/11 07:10:15 |
|
|
cmd_choose_tree_exec |
cmd_choose_tree_exec |
}; |
}; |
|
|
int |
enum cmd_retval |
cmd_choose_tree_exec(struct cmd *self, struct cmd_ctx *ctx) |
cmd_choose_tree_exec(struct cmd *self, struct cmd_ctx *ctx) |
{ |
{ |
struct args *args = self->args; |
struct args *args = self->args; |
|
|
|
|
if (ctx->curclient == NULL) { |
if (ctx->curclient == NULL) { |
ctx->error(ctx, "must be run interactively"); |
ctx->error(ctx, "must be run interactively"); |
return (-1); |
return (CMD_RETURN_ERROR); |
} |
} |
|
|
s = ctx->curclient->session; |
s = ctx->curclient->session; |
tty = &ctx->curclient->tty; |
tty = &ctx->curclient->tty; |
|
|
if ((wl = cmd_find_window(ctx, args_get(args, 't'), NULL)) == NULL) |
if ((wl = cmd_find_window(ctx, args_get(args, 't'), NULL)) == NULL) |
return (-1); |
return (CMD_RETURN_ERROR); |
|
|
if (window_pane_set_mode(wl->window->active, &window_choose_mode) != 0) |
if (window_pane_set_mode(wl->window->active, &window_choose_mode) != 0) |
return (0); |
return (CMD_RETURN_NORMAL); |
|
|
/* Sort out which command this is. */ |
/* Sort out which command this is. */ |
wflag = sflag = 0; |
wflag = sflag = 0; |
|
|
window_choose_ready(wl->window->active, cur_win, |
window_choose_ready(wl->window->active, cur_win, |
cmd_choose_tree_callback, cmd_choose_tree_free); |
cmd_choose_tree_callback, cmd_choose_tree_free); |
|
|
return (0); |
return (CMD_RETURN_NORMAL); |
} |
} |
|
|
void |
void |
|
|
free(cdata); |
free(cdata); |
|
|
} |
} |
|
|