diff options
author | Thomas Adam <thomas@xteddy.org> | 2017-03-08 14:01:23 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2017-03-08 14:01:23 +0000 |
commit | 3ea36830f38eed2d6dad6cb057b3efe772237d5e (patch) | |
tree | dad4d842a60527c85e904f63c3e29c596629f4d4 /window-copy.c | |
parent | 5d3296c53b820664d50d96b2b926f2c2c1105e97 (diff) | |
parent | 6b2009ad725b662853b8e94aee233fabdc5490f9 (diff) | |
download | rtmux-3ea36830f38eed2d6dad6cb057b3efe772237d5e.tar.gz rtmux-3ea36830f38eed2d6dad6cb057b3efe772237d5e.tar.bz2 rtmux-3ea36830f38eed2d6dad6cb057b3efe772237d5e.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'window-copy.c')
-rw-r--r-- | window-copy.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/window-copy.c b/window-copy.c index cb6243db..bf7dae56 100644 --- a/window-copy.c +++ b/window-copy.c @@ -1604,29 +1604,23 @@ window_copy_copy_buffer(struct window_pane *wp, const char *bufname, void *buf, } 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) { - void *buf; - size_t len; - struct job *job; - struct format_tree *ft; - char *expanded; + void *buf; + size_t len; + struct job *job; + char *expanded; buf = window_copy_get_selection(wp, &len); if (buf == NULL) return; + expanded = format_single(NULL, arg, NULL, s, NULL, wp); - ft = format_create(NULL, FORMAT_NONE, 0); - format_defaults(ft, NULL, sess, NULL, wp); - expanded = format_expand(ft, arg); - - job = job_run(expanded, sess, NULL, NULL, NULL, NULL); + job = job_run(expanded, s, NULL, NULL, NULL, NULL); bufferevent_write(job->event, buf, len); free(expanded); - format_free(ft); - window_copy_copy_buffer(wp, bufname, buf, len); } |