commit 117231130b05fc1bb785c826b5482fef264e4a10
parent 6d687fef03ee0d42f6bdf6256c7097e8379c1a15
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 13 Jul 2020 18:11:20 +0200
keep the current feed position when reading reloading + a simplification
Diffstat:
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/sfeed_curses.c b/sfeed_curses.c
@@ -1159,7 +1159,7 @@ feeds_load(struct feed *feeds, size_t nfeeds)
}
/* load first items, because of first selection or stdin. */
- if (i == 0)
+ if (i == 0 || f == curfeed)
feed_load(f, f->fp);
else
feed_count(f, f->fp);
@@ -1473,7 +1473,6 @@ main(int argc, char *argv[])
}
nfeeds = argc - 1;
}
- feeds_set(NULL);
feeds_load(feeds, nfeeds);
feeds_set(&feeds[0]);
@@ -1639,10 +1638,7 @@ nextpage:
case 'R': /* reload all files */
if (nfeeds == 1 && !feeds[0].path)
break; /* do not reload when read from stdin */
- feeds_set(NULL);
feeds_load(feeds, nfeeds);
- feeds_set(&feeds[0]);
- panes[PaneFeeds].pos = 0;
updatesidebar(onlynew);
updategeom();
updatetitle();