Commit: 9b257bd5d4d939a6f3fe338f237d6433b715d006
Parent: 55f402a0d3b9c1b81eb79a2cb7ac9e1aaac524bc
Author: Randy Palamar
Date: Fri, 20 Oct 2023 09:37:03 -0600
avoid uneccessary redraws from 0 len blocks
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/status.c b/status.c
@@ -35,7 +35,8 @@ static void
updateblock(struct Block *b)
{
b->len = b->fn(b);
- if (b->len == 0 || memcmp(b->curstr, b->prevstr, b->len)) {
+ if ((b->len == 0 && b->prevstr[0] != 0) ||
+ memcmp(b->curstr, b->prevstr, b->len)) {
if (b->len == 0)
b->prevstr[0] = b->curstr[0] = 0;
else