[BACK]Return to window-copy.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/window-copy.c between version 1.166 and 1.167

version 1.166, 2017/02/08 17:33:51 version 1.167, 2017/03/08 13:36:12
Line 1604 
Line 1604 
 }  }
   
 static void  static void
 window_copy_copy_pipe(struct window_pane *wp, struct session *sess,  window_copy_copy_pipe(struct window_pane *wp, struct session *s,
     const char *bufname, const char *arg)      const char *bufname, const char *arg)
 {  {
         void                    *buf;          void            *buf;
         size_t                   len;          size_t           len;
         struct job              *job;          struct job      *job;
         struct format_tree      *ft;          char            *expanded;
         char                    *expanded;  
   
         buf = window_copy_get_selection(wp, &len);          buf = window_copy_get_selection(wp, &len);
         if (buf == NULL)          if (buf == NULL)
                 return;                  return;
           expanded = format_single(NULL, arg, NULL, s, NULL, wp);
   
         ft = format_create(NULL, FORMAT_NONE, 0);          job = job_run(expanded, s, NULL, NULL, NULL, NULL);
         format_defaults(ft, NULL, sess, NULL, wp);  
         expanded = format_expand(ft, arg);  
   
         job = job_run(expanded, sess, NULL, NULL, NULL, NULL);  
         bufferevent_write(job->event, buf, len);          bufferevent_write(job->event, buf, len);
   
         free(expanded);          free(expanded);
         format_free(ft);  
   
         window_copy_copy_buffer(wp, bufname, buf, len);          window_copy_copy_buffer(wp, bufname, buf, len);
 }  }
   

Legend:
Removed from v.1.166  
changed lines
  Added in v.1.167