aboutsummaryrefslogtreecommitdiff
path: root/format.c
diff options
context:
space:
mode:
authornicm <nicm>2015-05-06 08:35:39 +0000
committernicm <nicm>2015-05-06 08:35:39 +0000
commit31b1ab48521b4b608d87abd5413441905da84da8 (patch)
treed5ea932dbadd29eb8dfc940af46cde28f51a8dca /format.c
parent33a585c47fcceb55e79a67a5fc47902d6992e68d (diff)
downloadrtmux-31b1ab48521b4b608d87abd5413441905da84da8.tar.gz
rtmux-31b1ab48521b4b608d87abd5413441905da84da8.tar.bz2
rtmux-31b1ab48521b4b608d87abd5413441905da84da8.zip
Add a format window_linked which is 1 if a window has been linked
multiple times, also remove the default space in window_flags and use a conditional to add it in window-status-format (this means additional flags can be added in the option without extra spaces). From Thomas Adam with tweaks by me.
Diffstat (limited to 'format.c')
-rw-r--r--format.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/format.c b/format.c
index 7ded05d2..ac28604d 100644
--- a/format.c
+++ b/format.c
@@ -621,6 +621,7 @@ format_defaults_winlink(struct format_tree *ft, struct session *s,
!!(wl->flags & WINLINK_SILENCE));
format_add(ft, "window_last_flag", "%d",
!!(wl == TAILQ_FIRST(&s->lastw)));
+ format_add(ft, "window_linked", "%d", session_is_linked(s, wl->window));
free(flags);
}