aboutsummaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2015-05-06 10:03:52 +0100
committerThomas Adam <thomas@xteddy.org>2015-05-06 10:03:52 +0100
commitf10d3675f8d86e76b5b04d8473b83a9eec778ab3 (patch)
tree3e56aa430262591d01934fd7e1a9ec8e07d4d120 /session.c
parentc0cf4843e50ae7b123613798c209f30440d73e55 (diff)
parent31b1ab48521b4b608d87abd5413441905da84da8 (diff)
downloadrtmux-f10d3675f8d86e76b5b04d8473b83a9eec778ab3.tar.gz
rtmux-f10d3675f8d86e76b5b04d8473b83a9eec778ab3.tar.bz2
rtmux-f10d3675f8d86e76b5b04d8473b83a9eec778ab3.zip
Merge branch 'obsd-master'
Diffstat (limited to 'session.c')
-rw-r--r--session.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/session.c b/session.c
index 7d86f68d..0780ec3f 100644
--- a/session.c
+++ b/session.c
@@ -336,6 +336,20 @@ session_has(struct session *s, struct window *w)
return (0);
}
+/*
+ * Return 1 if a window is linked outside this session (not including session
+ * groups). The window must be in this session!
+ */
+int
+session_is_linked(struct session *s, struct window *w)
+{
+ struct session_group *sg;
+
+ if ((sg = session_group_find(s)) != NULL)
+ return (w->references != session_group_count(sg));
+ return (w->references != 1);
+}
+
struct winlink *
session_next_alert(struct winlink *wl)
{