diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-02-20 14:58:23 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-02-20 14:58:23 +0000 |
commit | 7905f4600dd4ee0f88c4fadf1641c2afb2acc77a (patch) | |
tree | d7556b95b5862b5493e722077fe08e11156a20e3 /cmd-capture-pane.c | |
parent | 41c39e9bd96b1078058dd3febc0d2ff313c5c9c8 (diff) | |
parent | f81d72326458ec421348ab5aecc7038c1850407c (diff) | |
download | rtmux-7905f4600dd4ee0f88c4fadf1641c2afb2acc77a.tar.gz rtmux-7905f4600dd4ee0f88c4fadf1641c2afb2acc77a.tar.bz2 rtmux-7905f4600dd4ee0f88c4fadf1641c2afb2acc77a.zip |
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
Diffstat (limited to 'cmd-capture-pane.c')
-rw-r--r-- | cmd-capture-pane.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd-capture-pane.c b/cmd-capture-pane.c index 80be0165..83ec303c 100644 --- a/cmd-capture-pane.c +++ b/cmd-capture-pane.c @@ -44,7 +44,7 @@ enum cmd_retval cmd_capture_pane_exec(struct cmd *self, struct cmd_ctx *ctx) { struct args *args = self->args; - struct client *c = ctx->cmdclient; + struct client *c; struct window_pane *wp; char *buf, *line, *cause; struct screen *s; @@ -106,6 +106,9 @@ cmd_capture_pane_exec(struct cmd *self, struct cmd_ctx *ctx) } if (args_has(args, 'p')) { + c = ctx->curclient; + if (c == NULL || !(c->flags & CLIENT_CONTROL)) + c = ctx->cmdclient; if (c == NULL) { ctx->error(ctx, "can't write to stdout"); return (CMD_RETURN_ERROR); |