summaryrefslogtreecommitdiffstats
path: root/cmd-capture-pane.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2013-03-22 15:51:15 +0000
committerNicholas Marriott <nicm@openbsd.org>2013-03-22 15:51:15 +0000
commit8a6fbfa14829ad41b9b6f05f4382d8f4537b7271 (patch)
treeb37593cf562ae54aff949b5586a839f70b2b1c57 /cmd-capture-pane.c
parenta1722d5c2e545e4cce376848aab8a39465d3a036 (diff)
Don't use a target-client for stdout, just always cmdclient.
Diffstat (limited to 'cmd-capture-pane.c')
-rw-r--r--cmd-capture-pane.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/cmd-capture-pane.c b/cmd-capture-pane.c
index ee42ddee..fa4a5da2 100644
--- a/cmd-capture-pane.c
+++ b/cmd-capture-pane.c
@@ -31,9 +31,8 @@ enum cmd_retval cmd_capture_pane_exec(struct cmd *, struct cmd_ctx *);
const struct cmd_entry cmd_capture_pane_entry = {
"capture-pane", "capturep",
- "b:c:E:pS:t:", 0, 0,
- "[-p] [-c target-client] [-b buffer-index] [-E end-line] "
- "[-S start-line] "
+ "b:E:pS:t:", 0, 0,
+ "[-p] [-b buffer-index] [-E end-line] [-S start-line]"
CMD_TARGET_PANE_USAGE,
0,
NULL,
@@ -45,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;
+ struct client *c = ctx->cmdclient;
struct window_pane *wp;
char *buf, *line, *cause;
struct screen *s;
@@ -54,9 +53,6 @@ cmd_capture_pane_exec(struct cmd *self, struct cmd_ctx *ctx)
u_int i, limit, top, bottom, tmp;
size_t len, linelen;
- if ((c = cmd_find_client(ctx, args_get(args, 'c'))) == NULL)
- return (CMD_RETURN_ERROR);
-
if (cmd_find_pane(ctx, args_get(args, 't'), NULL, &wp) == NULL)
return (CMD_RETURN_ERROR);
s = &wp->base;