diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-05-23 19:42:20 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-05-23 19:42:20 +0000 |
commit | 559ee9138d9b84db8904b406e65a5c4490153566 (patch) | |
tree | 9599cf7191df4a803d91096139a241f5b87e0411 /usr.bin/tmux/cmd-send-keys.c | |
parent | 763741ec316949089a253bc1c5318b108f11c9c2 (diff) |
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 'usr.bin/tmux/cmd-send-keys.c')
-rw-r--r-- | usr.bin/tmux/cmd-send-keys.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-send-keys.c b/usr.bin/tmux/cmd-send-keys.c index 095840b6ab7..c6334aac752 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.7 2009/12/03 22:50:10 nicm Exp $ */ +/* $OpenBSD: cmd-send-keys.c,v 1.8 2010/05/23 19:42:19 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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); } |