diff options
author | 2020-04-13 10:59:58 +0000 | |
---|---|---|
committer | 2020-04-13 10:59:58 +0000 | |
commit | 040343ae18e7aa6a49c6acf6e4add8a0b76f6fff (patch) | |
tree | 8ed8ccb63639c656437cc1539d3d2b96b405d399 /usr.bin/tmux/cmd-save-buffer.c | |
parent | Make struct cmd local to cmd.c and move it out of tmux.h. (diff) | |
download | wireguard-openbsd-040343ae18e7aa6a49c6acf6e4add8a0b76f6fff.tar.xz wireguard-openbsd-040343ae18e7aa6a49c6acf6e4add8a0b76f6fff.zip |
Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make its
use more clearly defined and preparation for some future work).
Diffstat (limited to 'usr.bin/tmux/cmd-save-buffer.c')
-rw-r--r-- | usr.bin/tmux/cmd-save-buffer.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/tmux/cmd-save-buffer.c b/usr.bin/tmux/cmd-save-buffer.c index bd229f64085..6b8901a723a 100644 --- a/usr.bin/tmux/cmd-save-buffer.c +++ b/usr.bin/tmux/cmd-save-buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-save-buffer.c,v 1.48 2020/04/13 08:26:27 nicm Exp $ */ +/* $OpenBSD: cmd-save-buffer.c,v 1.49 2020/04/13 10:59:58 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org> @@ -75,9 +75,6 @@ cmd_save_buffer_exec(struct cmd *self, struct cmdq_item *item) { struct args *args = cmd_get_args(self); struct client *c = cmd_find_client(item, NULL, 1); - struct session *s = item->target.s; - struct winlink *wl = item->target.wl; - struct window_pane *wp = item->target.wp; struct paste_buffer *pb; int flags; const char *bufname = args_get(args, 'b'), *bufdata; @@ -101,12 +98,12 @@ cmd_save_buffer_exec(struct cmd *self, struct cmdq_item *item) if (cmd_get_entry(self) == &cmd_show_buffer_entry) path = xstrdup("-"); else - path = format_single(item, args->argv[0], c, s, wl, wp); + path = format_single_from_target(item, args->argv[0], c); if (args_has(args, 'a')) flags = O_APPEND; else flags = 0; - file_write(item->client, path, flags, bufdata, bufsize, + file_write(cmdq_get_client(item), path, flags, bufdata, bufsize, cmd_save_buffer_done, item); free(path); |