aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2020-12-17 20:18:09 +0000
committerHarry Jeffery <harry@exec64.co.uk>2020-12-17 20:18:09 +0000
commit49ba898e923b42b2d31fda9a953606a3ac82201c (patch)
tree0fa8757dc6b2995ddbe354d7f22d521a47a180e0 /src
parente3f135a0adf60f26748afd338d103fedd1a55322 (diff)
downloadimv-49ba898e923b42b2d31fda9a953606a3ac82201c.tar.gz
Fix first/last image indexing bug
Fixes #301
Diffstat (limited to 'src')
-rw-r--r--src/imv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imv.c b/src/imv.c
index feed4b8..b83980f 100644
--- a/src/imv.c
+++ b/src/imv.c
@@ -1641,7 +1641,7 @@ static void command_goto(struct list *args, const char *argstr, void *data)
}
long int index = strtol(args->items[1], NULL, 10);
- imv_navigator_select_abs(imv->navigator, index - 1);
+ imv_navigator_select_abs(imv->navigator, index > 0 ? index - 1 : index);
imv_viewport_reset_transform(imv->view);
imv->slideshow.elapsed = 0;