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-load-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-load-buffer.c')
-rw-r--r-- | usr.bin/tmux/cmd-load-buffer.c | 9 |
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); |