From 886b0f70cdb8cf07af5b90bd1b6caeb91fe080df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Fri, 4 Nov 2022 17:41:18 +0000 Subject: bar: increase the buffer to fit more aux data (noam decided to display the currently playing track there) --- sys/src/cmd/bar.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'sys/src/cmd/bar.c') 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(); } -- cgit v1.2.3