summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2014-08-16 22:21:51 +0200
committerBert Münnich <ber.t@posteo.de>2014-08-16 22:21:51 +0200
commite49d38d6f947b11570627b7354641e03f9200cef (patch)
tree4b0219c49756b41d4e6effab96b2d63b6bf49ac3 /main.c
parente267dc7793df0c3d8b1dcc48575a11d402df5499 (diff)
downloadnsxiv-e49d38d6f947b11570627b7354641e03f9200cef.tar.zst
Fixed wrong thumbnail-to-file mappings caused by file deletions
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.c b/main.c
index 5e99c43..b3dba90 100644
--- a/main.c
+++ b/main.c
@@ -679,7 +679,7 @@ void run(void)
/* load thumbnails */
reload = tns.loadnext != tns.cnt;
set_timeout(redraw, TO_REDRAW_THUMBS, false);
- if (tns_load(&tns, tns.loadnext, &files[tns.loadnext], reload)) {
+ if (tns_load(&tns, tns.loadnext, reload)) {
if (!reload)
tns.cnt++;
} else {
@@ -783,7 +783,7 @@ int main(int argc, char **argv)
parse_options(argc, argv);
if (options->clean_cache) {
- tns_init(&tns, 0, NULL, NULL);
+ tns_init(&tns, NULL, 0, NULL, NULL);
tns_clean_cache(&tns);
exit(EXIT_SUCCESS);
}
@@ -876,8 +876,8 @@ int main(int argc, char **argv)
if (options->thumb_mode) {
mode = MODE_THUMB;
- tns_init(&tns, filecnt, &win, &fileidx);
- while (!tns_load(&tns, 0, &files[0], false))
+ tns_init(&tns, files, filecnt, &fileidx, &win);
+ while (!tns_load(&tns, 0, false))
remove_file(0, false);
tns.cnt = 1;
} else {