diff options
author | Sigrid Solveig Haflínudóttir <sigrid@ftrv.se> | 2022-11-04 17:41:18 +0000 |
---|---|---|
committer | Sigrid Solveig Haflínudóttir <sigrid@ftrv.se> | 2022-11-04 17:41:18 +0000 |
commit | 886b0f70cdb8cf07af5b90bd1b6caeb91fe080df (patch) | |
tree | ab5119aa08400930bf4b7fa9cc69e6e98a364f70 | |
parent | 0cc26776cece29a23d1ddbad750a534df8d29f1b (diff) |
bar: increase the buffer to fit more aux data (noam decided to display the currently playing track there)
-rw-r--r-- | sys/src/cmd/bar.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/src/cmd/bar.c b/sys/src/cmd/bar.c index 35244c846..fcfde808c 100644 --- a/sys/src/cmd/bar.c +++ b/sys/src/cmd/bar.c @@ -125,8 +125,7 @@ split(char *s) static void redraw(void) { - static char s[128]; - char tmp[128]; + char s[1024]; Rectangle r; Tmfmt tf; Point p; @@ -161,10 +160,10 @@ redraw(void) flushimage(display, 1); - snprint(tmp, sizeof(tmp), "%τ", tf); - twidth = MAX(twidth, stringwidth(f, tmp)); - snprint(tmp, sizeof(tmp), "%|%s%|%s", bats, bats[0] ? "100%" : "", aux, aux); - width = twidth + stringwidth(f, tmp); + snprint(s, sizeof(s), "%τ", tf); + twidth = MAX(twidth, stringwidth(f, s)); + snprint(s, sizeof(s), "%|%s%|%s", bats, bats[0] ? "100%" : "", aux, aux); + width = twidth + stringwidth(f, s); if(owidth != width) place(); } |