summaryrefslogtreecommitdiffstats
path: root/cmd-send-keys.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-08-18 16:21:04 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-08-18 16:21:04 +0000
commit145ba777e8ad6cca977e6b310de15145e4f1c321 (patch)
tree5135b142d33aedcb18844e25bd38692684f873f2 /cmd-send-keys.c
parentdc6271cd79947c020fc21a9d5641de6d576f61f2 (diff)
Now that pane targets (-t) are supported, switch some commands to use them
where it makes sense: clock-mode, copy-mode, scroll-mode, send-keys, send-prefix.
Diffstat (limited to 'cmd-send-keys.c')
-rw-r--r--cmd-send-keys.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/cmd-send-keys.c b/cmd-send-keys.c
index 04b21f95..037cbf33 100644
--- a/cmd-send-keys.c
+++ b/cmd-send-keys.c
@@ -40,7 +40,7 @@ struct cmd_send_keys_data {
const struct cmd_entry cmd_send_keys_entry = {
"send-keys", "send",
- "[-t target-window] key ...",
+ "[-t target-pane] key ...",
0, 0,
NULL,
cmd_send_keys_parse,
@@ -106,19 +106,17 @@ int
cmd_send_keys_exec(struct cmd *self, struct cmd_ctx *ctx)
{
struct cmd_send_keys_data *data = self->data;
- struct winlink *wl;
+ struct window_pane *wp;
u_int i;
if (data == NULL)
return (-1);
- if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL)
+ if (cmd_find_pane(ctx, data->target, NULL, &wp) == NULL)
return (-1);
- for (i = 0; i < data->nkeys; i++) {
- window_pane_key(
- wl->window->active, ctx->curclient, data->keys[i]);
- }
+ for (i = 0; i < data->nkeys; i++)
+ window_pane_key(wp, ctx->curclient, data->keys[i]);
return (0);
}