diff options
author | Thomas Adam <thomas@xteddy.org> | 2016-06-06 10:01:11 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2016-06-06 10:01:11 +0100 |
commit | cc096ae9291c35887679c7031c24cac218ddc319 (patch) | |
tree | b2cfe5c70312723a6fe91d22660b00ba71a69d74 /status.c | |
parent | 1f75c98f4999856ddb6a5d620b6dd1ed18b6324d (diff) | |
parent | aba44380137b5d78f9033e46b5dc4a4f3ef1012a (diff) | |
download | rtmux-cc096ae9291c35887679c7031c24cac218ddc319.tar.gz rtmux-cc096ae9291c35887679c7031c24cac218ddc319.tar.bz2 rtmux-cc096ae9291c35887679c7031c24cac218ddc319.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'status.c')
-rw-r--r-- | status.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -257,16 +257,19 @@ status_get_window_at(struct client *c, u_int x) struct session *s = c->session; struct winlink *wl; struct options *oo; - size_t len; + const char *sep; + size_t seplen; x += c->wlmouse; RB_FOREACH(wl, winlinks, &s->windows) { oo = wl->window->options; - len = strlen(options_get_string(oo, "window-status-separator")); + + sep = options_get_string(oo, "window-status-separator"); + seplen = screen_write_cstrlen("%s", sep); if (x < wl->status_width) return (wl->window); - x -= wl->status_width + len; + x -= wl->status_width + seplen; } return (NULL); } @@ -344,7 +347,7 @@ status_redraw(struct client *c) oo = wl->window->options; sep = options_get_string(oo, "window-status-separator"); - seplen = screen_write_strlen("%s", sep); + seplen = screen_write_cstrlen("%s", sep); wlwidth += wl->status_width + seplen; } @@ -359,7 +362,7 @@ status_redraw(struct client *c) oo = wl->window->options; sep = options_get_string(oo, "window-status-separator"); - screen_write_nputs(&ctx, -1, &stdgc, "%s", sep); + screen_write_cnputs(&ctx, -1, &stdgc, "%s", sep); } screen_write_stop(&ctx); |