sfeed_curses

[fork] sfeed (atom feed) reader
Log | Files | Refs | README | LICENSE

commit 39923ea9eeda6253e0fea8ada0f0b31937dbf0f6
parent d6695891572e06cae40d89068aaa598b0b049019
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 27 Jun 2020 21:46:15 +0200

fix regression in sidebar calculation when `onlynew` items are shown

Diffstat:
Msfeed_curses.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sfeed_curses.c b/sfeed_curses.c @@ -1072,8 +1072,6 @@ updatesidebar(int onlynew) for (i = 0; i < nfeeds; i++) { feed = &feeds[i]; - if (onlynew && feed->totalnew == 0) - continue; row = &(p->rows[p->nrows]); row->text = ""; /* custom formatter is used */ row->bold = (feed->totalnew > 0); @@ -1083,6 +1081,9 @@ updatesidebar(int onlynew) if (len > width) width = len; + if (onlynew && feed->totalnew == 0) + continue; + p->nrows++; } p->width = width;