summaryrefslogtreecommitdiffstats
path: root/commands.c
diff options
context:
space:
mode:
authorbaskerville <nihilhill@gmail.com>2012-05-08 16:30:56 +0200
committerbaskerville <nihilhill@gmail.com>2012-05-08 16:30:56 +0200
commitde4e9fc83ea58afa14a815af78edadc155bb8221 (patch)
treee0728eca221a3e2815d124b2c4c76730c1556be4 /commands.c
parent4c40cc24bc6b3e11fc9e6cf337ddb035fa750eb3 (diff)
downloadnsxiv-de4e9fc83ea58afa14a815af78edadc155bb8221.tar.zst
Added a command to refresh the thumbnails
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/commands.c b/commands.c
index d07e950..7567757 100644
--- a/commands.c
+++ b/commands.c
@@ -94,6 +94,24 @@ bool it_toggle_bar(arg_t a) {
return true;
}
+bool it_refresh_thumbs(arg_t a) {
+ int i = 0;
+ if (mode == MODE_THUMB) {
+ win_set_cursor(&win, CURSOR_WATCH);
+ while (i < filecnt) {
+ if (!tns_load(&tns, i, &files[i], true, false)) {
+ remove_file(i, false);
+ tns.dirty = true;
+ if (tns.sel >= tns.cnt)
+ tns.sel = tns.cnt - 1;
+ } else {
+ i++;
+ }
+ }
+ }
+ return true;
+}
+
bool it_reload_image(arg_t a) {
if (mode == MODE_IMAGE) {
load_image(fileidx);