summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-load-buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd-load-buffer.c')
-rw-r--r--usr.bin/tmux/cmd-load-buffer.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/tmux/cmd-load-buffer.c b/usr.bin/tmux/cmd-load-buffer.c
index e70d936fa3f..90515f3ddf6 100644
--- a/usr.bin/tmux/cmd-load-buffer.c
+++ b/usr.bin/tmux/cmd-load-buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-load-buffer.c,v 1.58 2020/04/13 08:26:27 nicm Exp $ */
+/* $OpenBSD: cmd-load-buffer.c,v 1.59 2020/04/13 10:59:58 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -86,9 +86,6 @@ cmd_load_buffer_exec(struct cmd *self, struct cmdq_item *item)
struct args *args = cmd_get_args(self);
struct cmd_load_buffer_data *cdata;
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;
const char *bufname = args_get(args, 'b');
char *path;
@@ -99,8 +96,8 @@ cmd_load_buffer_exec(struct cmd *self, struct cmdq_item *item)
else
cdata->name = NULL;
- path = format_single(item, args->argv[0], c, s, wl, wp);
- file_read(item->client, path, cmd_load_buffer_done, cdata);
+ path = format_single_from_target(item, args->argv[0], c);
+ file_read(cmdq_get_client(item), path, cmd_load_buffer_done, cdata);
free(path);
return (CMD_RETURN_WAIT);