summaryrefslogtreecommitdiffstats
path: root/cmd-source-file.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:34:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:34:56 +0000
commitc294c2bf54a3ec56271a78c284f84e75a8119731 (patch)
treef1fed2d81b80619666e9508fa5051bcfc34fae5f /cmd-source-file.c
parentReleasing progress-linux version 3.3a-5~progress7.99u1. (diff)
downloadtmux-c294c2bf54a3ec56271a78c284f84e75a8119731.tar.xz
tmux-c294c2bf54a3ec56271a78c284f84e75a8119731.zip
Merging upstream version 3.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cmd-source-file.c')
-rw-r--r--cmd-source-file.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/cmd-source-file.c b/cmd-source-file.c
index 255d443..b390ed6 100644
--- a/cmd-source-file.c
+++ b/cmd-source-file.c
@@ -35,8 +35,10 @@ const struct cmd_entry cmd_source_file_entry = {
.name = "source-file",
.alias = "source",
- .args = { "Fnqv", 1, -1, NULL },
- .usage = "[-Fnqv] path ...",
+ .args = { "t:Fnqv", 1, -1, NULL },
+ .usage = "[-Fnqv] " CMD_TARGET_PANE_USAGE " path ...",
+
+ .target = { 't', CMD_FIND_PANE, CMD_FIND_CANFAIL },
.flags = 0,
.exec = cmd_source_file_exec
@@ -92,6 +94,7 @@ cmd_source_file_done(struct client *c, const char *path, int error,
size_t bsize = EVBUFFER_LENGTH(buffer);
u_int n;
struct cmdq_item *new_item;
+ struct cmd_find_state *target = cmdq_get_target(item);
if (!closed)
return;
@@ -100,7 +103,7 @@ cmd_source_file_done(struct client *c, const char *path, int error,
cmdq_error(item, "%s: %s", path, strerror(error));
else if (bsize != 0) {
if (load_cfg_from_buffer(bdata, bsize, path, c, cdata->after,
- cdata->flags, &new_item) < 0)
+ target, cdata->flags, &new_item) < 0)
cdata->retval = CMD_RETURN_ERROR;
else if (new_item != NULL)
cdata->after = new_item;