diff options
author | Bert Münnich <ber.t@gmx.com> | 2012-02-15 18:25:45 +0100 |
---|---|---|
committer | Bert Münnich <ber.t@gmx.com> | 2012-02-15 18:25:45 +0100 |
commit | b752d5c594d5aac083cc563e8c7e575baf7b8edc (patch) | |
tree | ccb757a004c0b140551658c68dfd1d1528f6e747 /window.c | |
parent | b8fa2e86fe6aa1e1906cc051a8ea915b6f1b4d43 (diff) |
Added symbol BAR_SEPARATOR
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -334,7 +334,7 @@ int win_textwidth(const char *text, unsigned int len) { } void win_draw_bar(win_t *win) { win_env_t *e; - int len, x, y, w, tw = 0; + int len, x, y, w, tw = 0, seplen; const char *rt; if (win == NULL || win->xwin == None) @@ -363,11 +363,12 @@ void win_draw_bar(win_t *win) { } if (win->rbar != NULL) { len = strlen(win->rbar); + seplen = strlen(BAR_SEPARATOR); rt = win->rbar; while (len > 0 && (tw = win_textwidth(rt, len)) > w) { - rt = strstr(rt, " "); + rt = strstr(rt, BAR_SEPARATOR); if (rt != NULL) { - rt += 2; + rt += seplen; len = strlen(rt); } else { len = 0; |