diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-05-06 08:35:40 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-05-06 08:35:40 +0000 |
commit | 6b482673b9d403f6307339c97efc44eb02a1fa23 (patch) | |
tree | 2b7d252c92d22f04e5a09bbfe419a373144d2871 /usr.bin/tmux/format.c | |
parent | a19da5438d0b55c7f7b1f116d939dd84d8cf7a06 (diff) |
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 'usr.bin/tmux/format.c')
-rw-r--r-- | usr.bin/tmux/format.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index 8b0538e87d4..d3f350d902d 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.63 2015/04/21 22:38:49 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.64 2015/05/06 08:35:39 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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); } |