diff options
author | 2009-08-18 16:21:04 +0000 | |
---|---|---|
committer | 2009-08-18 16:21:04 +0000 | |
commit | ba61d28884bd7b47378b630bb01048500424a65c (patch) | |
tree | 5bc2646cd55f0a79f8964fe1de30fe186938cfd8 /usr.bin/tmux/cmd-send-keys.c | |
parent | Tag a few missed printf-like functions and fix a missing "%s". (diff) | |
download | wireguard-openbsd-ba61d28884bd7b47378b630bb01048500424a65c.tar.xz wireguard-openbsd-ba61d28884bd7b47378b630bb01048500424a65c.zip |
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 'usr.bin/tmux/cmd-send-keys.c')
-rw-r--r-- | usr.bin/tmux/cmd-send-keys.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/usr.bin/tmux/cmd-send-keys.c b/usr.bin/tmux/cmd-send-keys.c index 55eb22b0510..c0acc8a779b 100644 --- a/usr.bin/tmux/cmd-send-keys.c +++ b/usr.bin/tmux/cmd-send-keys.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-send-keys.c,v 1.3 2009/07/26 12:58:44 nicm Exp $ */ +/* $OpenBSD: cmd-send-keys.c,v 1.4 2009/08/18 16:21:04 nicm 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); } |