summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-find.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2018-04-18 14:35:38 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2018-04-18 14:35:38 +0000
commit6ea4c6fa169500fdbf26a83047ef05f0a45819a8 (patch)
treea77f70429eb7161f92afd3a0a772b4bcf7bb28db /usr.bin/tmux/cmd-find.c
parentbc6169532244eb6cc89f43d55a519f7af5846e5d (diff)
Change how display-message uses the client. Originally it was only
intended as the target client where the message should be displayed but at some point (perhaps when -p was added), it was used for format expansion too. This means it can get a bit weird where you have client formats expanding for a client with a different current session than the target session. However, it is nice that display-message can be used to show information about a specific client. So change so that the -c client will be used if the session matches the target session (-t or default), otherwise the best client will be chosen.
Diffstat (limited to 'usr.bin/tmux/cmd-find.c')
-rw-r--r--usr.bin/tmux/cmd-find.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-find.c b/usr.bin/tmux/cmd-find.c
index 02dbe85bc76..5dfd00d25f7 100644
--- a/usr.bin/tmux/cmd-find.c
+++ b/usr.bin/tmux/cmd-find.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-find.c,v 1.60 2018/03/17 16:48:17 nicm Exp $ */
+/* $OpenBSD: cmd-find.c,v 1.61 2018/04/18 14:35:37 nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -122,7 +122,7 @@ cmd_find_client_better(struct client *c, struct client *than)
}
/* Find best client for session. */
-static struct client *
+struct client *
cmd_find_best_client(struct session *s)
{
struct client *c_loop, *c;