summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-save-buffer.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-04-13 11:00:00 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-04-13 11:00:00 +0000
commit56530d4d9e327bc4c76b8b02290102a1fadfffb9 (patch)
treec902ce5f812b38436dec697a5fa08bf3615c0ed4 /usr.bin/tmux/cmd-save-buffer.c
parent9947eee19da9830a3c591d7fb4574df8cdd144e6 (diff)
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.c9
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);