summaryrefslogtreecommitdiffstats
path: root/cmd-send-keys.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-08-20 11:37:46 +0000
committerTiago Cunha <tcunha@gmx.com>2009-08-20 11:37:46 +0000
commit36475f80e9885588ed6a67f762289f7e56add84f (patch)
tree9c324b1f01c8b0765d48b114402828453fc5d892 /cmd-send-keys.c
parent52b02850ca960f5f540176036200a83ca73f1267 (diff)
Sync OpenBSD patchset 271:
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.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/cmd-send-keys.c b/cmd-send-keys.c
index 4887e84a..c0365592 100644
--- a/cmd-send-keys.c
+++ b/cmd-send-keys.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-send-keys.c,v 1.20 2009-07-28 22:12:16 tcunha Exp $ */
+/* $Id: cmd-send-keys.c,v 1.21 2009-08-20 11:37:46 tcunha Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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);
}