From 71a7940d74459c8a575100f93fe43e204413c2db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bert=20M=C3=BCnnich?= Date: Tue, 1 Nov 2011 08:36:20 +0100 Subject: Better fix for issue #25 --- main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 22729e9..f859090 100644 --- a/main.c +++ b/main.c @@ -416,10 +416,13 @@ void run(void) { { /* load thumbnails */ set_timeout(redraw, TO_REDRAW_THUMBS, false); - if (tns_load(&tns, tns.cnt, &files[tns.cnt], false, false)) + if (tns_load(&tns, tns.cnt, &files[tns.cnt], false, false)) { tns.cnt++; - else + } else { remove_file(tns.cnt, false); + if (tns.sel >= tns.cnt) + tns.sel--; + } if (tns.cnt == filecnt) redraw(); else -- cgit v1.2.3