commit b5c197d08de4664faba84ab9b8fb1fd38bf68e2a
parent b805c629c70701bb49dbd89d6a0cb6277a8ed7fa
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 20 Jul 2020 22:06:17 +0200
fix an issue on reloadall and handling the current open feed
To reproduce:
- Select a feed other than the first one.
- Change the first feed file in a way.
- Reload all.
- Open first feed.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sfeed_curses.c b/sfeed_curses.c
@@ -1229,7 +1229,7 @@ feeds_load(struct feed *feeds, size_t nfeeds)
}
/* load first items, because of first selection or stdin. */
- if (i == 0 || f == curfeed) {
+ if (f == curfeed) {
feed_load(f, f->fp);
} else {
feed_count(f, f->fp);
@@ -1688,8 +1688,8 @@ main(int argc, char *argv[])
nfeeds = argc - 1;
}
readurls();
- feeds_load(feeds, nfeeds);
feeds_set(&feeds[0]);
+ feeds_load(feeds, nfeeds);
if (!isatty(0)) {
if ((fd = open("/dev/tty", O_RDONLY)) == -1)