version 1.9, 2012/01/21 08:40:09 |
version 1.10, 2012/07/11 07:10:15 |
|
|
* Send prefix key as a key. |
* Send prefix key as a key. |
*/ |
*/ |
|
|
int cmd_send_prefix_exec(struct cmd *, struct cmd_ctx *); |
enum cmd_retval cmd_send_prefix_exec(struct cmd *, struct cmd_ctx *); |
|
|
const struct cmd_entry cmd_send_prefix_entry = { |
const struct cmd_entry cmd_send_prefix_entry = { |
"send-prefix", NULL, |
"send-prefix", NULL, |
|
|
cmd_send_prefix_exec |
cmd_send_prefix_exec |
}; |
}; |
|
|
int |
enum cmd_retval |
cmd_send_prefix_exec(struct cmd *self, struct cmd_ctx *ctx) |
cmd_send_prefix_exec(struct cmd *self, struct cmd_ctx *ctx) |
{ |
{ |
struct args *args = self->args; |
struct args *args = self->args; |
|
|
int key; |
int key; |
|
|
if (cmd_find_pane(ctx, args_get(args, 't'), &s, &wp) == NULL) |
if (cmd_find_pane(ctx, args_get(args, 't'), &s, &wp) == NULL) |
return (-1); |
return (CMD_RETURN_ERROR); |
|
|
if (args_has(args, '2')) |
if (args_has(args, '2')) |
key = options_get_number(&s->options, "prefix2"); |
key = options_get_number(&s->options, "prefix2"); |
|
|
key = options_get_number(&s->options, "prefix"); |
key = options_get_number(&s->options, "prefix"); |
window_pane_key(wp, s, key); |
window_pane_key(wp, s, key); |
|
|
return (0); |
return (CMD_RETURN_NORMAL); |
} |
} |