[BACK]Return to cmd-save-buffer.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/cmd-save-buffer.c between version 1.16 and 1.17

version 1.16, 2012/07/11 07:10:15 version 1.17, 2013/03/22 15:53:24
Line 45 
Line 45 
 cmd_save_buffer_exec(struct cmd *self, struct cmd_ctx *ctx)  cmd_save_buffer_exec(struct cmd *self, struct cmd_ctx *ctx)
 {  {
         struct args             *args = self->args;          struct args             *args = self->args;
         struct client           *c = ctx->cmdclient;          struct client           *c;
         struct session          *s;          struct session          *s;
         struct paste_buffer     *pb;          struct paste_buffer     *pb;
         const char              *path, *newpath, *wd;          const char              *path, *newpath, *wd;
Line 76 
Line 76 
   
         path = args->argv[0];          path = args->argv[0];
         if (strcmp(path, "-") == 0) {          if (strcmp(path, "-") == 0) {
                   c = ctx->curclient;
                   if (c == NULL || !(c->flags & CLIENT_CONTROL))
                           c = ctx->cmdclient;
                 if (c == NULL) {                  if (c == NULL) {
                         ctx->error(ctx, "%s: can't write to stdout", path);                          ctx->error(ctx, "can't write to stdout");
                         return (CMD_RETURN_ERROR);                          return (CMD_RETURN_ERROR);
                 }                  }
                 evbuffer_add(c->stdout_data, pb->data, pb->size);                  evbuffer_add(c->stdout_data, pb->data, pb->size);
                 server_push_stdout(c);                  server_push_stdout(c);
         } else {          } else {
                   c = ctx->cmdclient;
                 if (c != NULL)                  if (c != NULL)
                         wd = c->cwd;                          wd = c->cwd;
                 else if ((s = cmd_current_session(ctx, 0)) != NULL) {                  else if ((s = cmd_current_session(ctx, 0)) != NULL) {

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17