diff options
author | Tiago Cunha <tcunha@gmx.com> | 2012-04-24 16:20:18 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2012-04-24 16:20:18 +0000 |
commit | 6df8953f4f93b6dad98ac7f16f9c7f5eec02622c (patch) | |
tree | 5f0111349f6f48974563729d884d392881eb1445 /status.c | |
parent | 00e2e357406be926027659a7dce894e8d263c4ca (diff) | |
download | rtmux-6df8953f4f93b6dad98ac7f16f9c7f5eec02622c.tar.gz rtmux-6df8953f4f93b6dad98ac7f16f9c7f5eec02622c.tar.bz2 rtmux-6df8953f4f93b6dad98ac7f16f9c7f5eec02622c.zip |
Sync OpenBSD patchset 1097:
Add window-status-separator option, from Thomas Adam.
Diffstat (limited to 'status.c')
-rw-r--r-- | status.c | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -160,11 +160,12 @@ status_redraw(struct client *c) struct winlink *wl; struct screen old_status, window_list; struct grid_cell stdgc, lgc, rgc, gc; + struct options *oo; time_t t; - char *left, *right; + char *left, *right, *sep; u_int offset, needed; u_int wlstart, wlwidth, wlavailable, wloffset, wlsize; - size_t llen, rlen; + size_t llen, rlen, seplen; int larrow, rarrow, utf8flag; /* No status line? */ @@ -230,7 +231,11 @@ status_redraw(struct client *c) if (wl == s->curw) wloffset = wlwidth; - wlwidth += wl->status_width + 1; + + oo = &wl->window->options; + sep = options_get_string(oo, "window-status-separator"); + seplen = screen_write_strlen(utf8flag, "%s", sep); + wlwidth += wl->status_width + seplen; } /* Create a new screen for the window list. */ @@ -241,7 +246,10 @@ status_redraw(struct client *c) RB_FOREACH(wl, winlinks, &s->windows) { screen_write_cnputs(&ctx, -1, &wl->status_cell, utf8flag, "%s", wl->status_text); - screen_write_putc(&ctx, &stdgc, ' '); + + oo = &wl->window->options; + sep = options_get_string(oo, "window-status-separator"); + screen_write_nputs(&ctx, -1, &stdgc, utf8flag, "%s", sep); } screen_write_stop(&ctx); |