Do not require a client here, or pipe-pane will not work from the

command line.
This commit is contained in:
Nicholas Marriott 2011-07-30 17:52:32 +00:00
parent 0252796a57
commit be179f6d7e

View File

@ -55,11 +55,9 @@ cmd_pipe_pane_exec(struct cmd *self, struct cmd_ctx *ctx)
char *command; char *command;
int old_fd, pipe_fd[2], null_fd; int old_fd, pipe_fd[2], null_fd;
if ((c = cmd_find_client(ctx, NULL)) == NULL)
return (-1);
if (cmd_find_pane(ctx, args_get(args, 't'), NULL, &wp) == NULL) if (cmd_find_pane(ctx, args_get(args, 't'), NULL, &wp) == NULL)
return (-1); return (-1);
c = cmd_find_client(ctx, NULL);
/* Destroy the old pipe. */ /* Destroy the old pipe. */
old_fd = wp->pipe_fd; old_fd = wp->pipe_fd;