summaryrefslogtreecommitdiffstats
path: root/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/commands.c b/commands.c
index 89dcf8d..a8b9e77 100644
--- a/commands.c
+++ b/commands.c
@@ -69,10 +69,7 @@ bool it_switch_mode(arg_t a) {
img.slideshow = false;
reset_timeout(slideshow);
}
- if (fileidx < tns.cnt)
- tns.sel = fileidx;
- else
- tns.sel = tns.cnt > 0 ? tns.cnt - 1 : 0;
+ tns.sel = fileidx;
tns.dirty = true;
mode = MODE_THUMB;
} else {