diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-12-30 21:35:18 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-12-30 21:35:18 +0000 |
commit | f66849a747061b214759850d84eaf280ffd85645 (patch) | |
tree | c30a38509f8a0ed7cc235ada1aeb3af2315d982c /usr.bin/tmux/status.c | |
parent | ba39fc04f6ed951c358090ec83f5cab848b8a456 (diff) |
Add a function to create window flags rather than doing the same thing
in two places. From Thomas Adam.
Diffstat (limited to 'usr.bin/tmux/status.c')
-rw-r--r-- | usr.bin/tmux/status.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c index f71a0955864..6c270a27417 100644 --- a/usr.bin/tmux/status.c +++ b/usr.bin/tmux/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.66 2010/12/11 16:13:15 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.67 2010/12/30 21:35:17 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -393,21 +393,8 @@ status_replace1(struct client *c,struct winlink *wl, ptr = wl->window->name; goto do_replace; case 'F': - tmp[0] = ' '; - if (wl->flags & WINLINK_CONTENT) - tmp[0] = '+'; - else if (wl->flags & WINLINK_BELL) - tmp[0] = '!'; - else if (wl->flags & WINLINK_ACTIVITY) - tmp[0] = '#'; - else if (wl->flags & WINLINK_SILENCE) - tmp[0] = '~'; - else if (wl == s->curw) - tmp[0] = '*'; - else if (wl == TAILQ_FIRST(&s->lastw)) - tmp[0] = '-'; - tmp[1] = '\0'; - ptr = tmp; + ptr = window_printable_flags(s, wl); + freeptr = ptr; goto do_replace; case '[': /* |