aboutsummaryrefslogtreecommitdiff
path: root/commands.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 /commands.c
parente267dc7793df0c3d8b1dcc48575a11d402df5499 (diff)
Fixed wrong thumbnail-to-file mappings caused by file deletions
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/commands.c b/commands.c
index 7d5a986..f6f155c 100644
--- a/commands.c
+++ b/commands.c
@@ -77,7 +77,7 @@ bool cg_switch_mode(arg_t a)
{
if (mode == MODE_IMAGE) {
if (tns.thumbs == NULL)
- tns_init(&tns, filecnt, &win, &fileidx);
+ tns_init(&tns, files, filecnt, &fileidx, &win);
img_close(&img, false);
reset_timeout(reset_cursor);
if (img.ss.on) {
@@ -130,7 +130,7 @@ bool cg_reload_image(arg_t a)
load_image(fileidx);
} else {
win_set_cursor(&win, CURSOR_WATCH);
- if (!tns_load(&tns, fileidx, &files[fileidx], true)) {
+ if (!tns_load(&tns, fileidx, true)) {
remove_file(fileidx, false);
tns.dirty = true;
}
@@ -456,7 +456,7 @@ bool ct_move_sel(arg_t a)
bool ct_reload_all(arg_t a)
{
tns_free(&tns);
- tns_init(&tns, filecnt, &win, &fileidx);
+ tns_init(&tns, files, filecnt, &fileidx, &win);
return false;
}