aboutsummaryrefslogtreecommitdiff
path: root/format.c
diff options
context:
space:
mode:
authornicm <nicm>2020-04-13 20:51:57 +0000
committernicm <nicm>2020-04-13 20:51:57 +0000
commit3f7f9a0e20522c73e33480673496240f1bac724b (patch)
treec0ec19a026014bfd6981622ecd9ee2783344ef25 /format.c
parent187277eaadc4a675659bf7ede88f50bfe6cc7be9 (diff)
downloadrtmux-3f7f9a0e20522c73e33480673496240f1bac724b.tar.gz
rtmux-3f7f9a0e20522c73e33480673496240f1bac724b.tar.bz2
rtmux-3f7f9a0e20522c73e33480673496240f1bac724b.zip
Make client -c and -t handling common in cmd-queue.c and try to be
clearer about whether the client is the target client (must have a session) or not.
Diffstat (limited to 'format.c')
-rw-r--r--format.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/format.c b/format.c
index 08fa38df..fd3b45b9 100644
--- a/format.c
+++ b/format.c
@@ -2429,12 +2429,12 @@ format_single(struct cmdq_item *item, const char *fmt, struct client *c,
/* Expand a single string using target. */
char *
-format_single_from_target(struct cmdq_item *item, const char *fmt,
- struct client *c)
+format_single_from_target(struct cmdq_item *item, const char *fmt)
{
struct cmd_find_state *target = cmdq_get_target(item);
+ struct client *tc = cmdq_get_target_client(item);
- return (format_single(item, fmt, c, target->s, target->wl, target->wp));
+ return (format_single(item, fmt, tc, target->s, target->wl, target->wp));
}
/* Set defaults for any of arguments that are not NULL. */