=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-source-file.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- src/usr.bin/tmux/cmd-source-file.c 2021/08/23 11:04:21 1.53 +++ src/usr.bin/tmux/cmd-source-file.c 2023/09/15 06:31:49 1.54 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-source-file.c,v 1.53 2021/08/23 11:04:21 nicm Exp $ */ +/* $OpenBSD: cmd-source-file.c,v 1.54 2023/09/15 06:31:49 nicm Exp $ */ /* * Copyright (c) 2008 Tiago Cunha @@ -36,9 +36,11 @@ .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 }; @@ -93,6 +95,7 @@ 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; @@ -101,7 +104,7 @@ 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;