summaryrefslogtreecommitdiffstats
path: root/status.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2010-12-30 21:35:17 +0000
committerNicholas Marriott <nicm@openbsd.org>2010-12-30 21:35:17 +0000
commit2231e72968629d67575b18979fed13b4f5ad730b (patch)
tree1271c5ef9fc8239ad20bc16303aa6cf7bbd435e8 /status.c
parentf7c42c21bacf84af52079b239a18294851fbdb3a (diff)
Add a function to create window flags rather than doing the same thing
in two places. From Thomas Adam.
Diffstat (limited to 'status.c')
-rw-r--r--status.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/status.c b/status.c
index 74316f2d..5523858d 100644
--- a/status.c
+++ b/status.c
@@ -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 '[':
/*