diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2010-05-23 19:42:19 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2010-05-23 19:42:19 +0000 |
commit | 4f5c5b37b866967be189901bc140ca6b8c25c5e3 (patch) | |
tree | ea5b685be2f69f30fc18872caefc0024e2574c7a /cmd-send-keys.c | |
parent | 0ed727a0128dd84ae727a337208a31df8f3cff02 (diff) | |
download | rtmux-4f5c5b37b866967be189901bc140ca6b8c25c5e3.tar.gz rtmux-4f5c5b37b866967be189901bc140ca6b8c25c5e3.tar.bz2 rtmux-4f5c5b37b866967be189901bc140ca6b8c25c5e3.zip |
Pass in the session, rather than the client, to window modes' key()
function. We were only ever using the client to find the session anyway.
This allows send-key to work properly for manipulating copy mode from
outside tmux.
From Micah Cowan.
Diffstat (limited to 'cmd-send-keys.c')
-rw-r--r-- | cmd-send-keys.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd-send-keys.c b/cmd-send-keys.c index 204d497d..3c680524 100644 --- a/cmd-send-keys.c +++ b/cmd-send-keys.c @@ -105,16 +105,17 @@ cmd_send_keys_exec(struct cmd *self, struct cmd_ctx *ctx) { struct cmd_send_keys_data *data = self->data; struct window_pane *wp; + struct session *s; u_int i; if (data == NULL) return (-1); - if (cmd_find_pane(ctx, data->target, NULL, &wp) == NULL) + if (cmd_find_pane(ctx, data->target, &s, &wp) == NULL) return (-1); for (i = 0; i < data->nkeys; i++) - window_pane_key(wp, ctx->curclient, data->keys[i]); + window_pane_key(wp, s, data->keys[i]); return (0); } |