diff options
author | ulteq <ulteq@web.de> | 2018-08-29 20:32:07 +0200 |
---|---|---|
committer | ulteq <ulteq@web.de> | 2018-08-29 20:32:07 +0200 |
commit | 5f46d5a4c29936826e5355e684056b2e8423921f (patch) | |
tree | c9f5fad66d18795fc3da05d4cb198634ca564f20 /src | |
parent | 602641c73512874d39011030b05bce03cc55134f (diff) |
This will fix 'jump_last' and 'jump_first' when using no-cycle
Diffstat (limited to 'src')
-rw-r--r-- | src/slideshow.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/slideshow.c b/src/slideshow.c index 6a4f4d1..3770677 100644 --- a/src/slideshow.c +++ b/src/slideshow.c @@ -238,9 +238,11 @@ void slideshow_change_image(winwidget winwid, int change, int render) if (change == SLIDE_FIRST) { current_file = gib_list_last(filelist); change = SLIDE_NEXT; + previous_file = NULL; } else if (change == SLIDE_LAST) { current_file = filelist; change = SLIDE_PREV; + previous_file = NULL; } /* The for loop prevents us looping infinitely */ @@ -336,7 +338,7 @@ void slideshow_change_image(winwidget winwid, int change, int render) last = NULL; } - if (opt.on_last_slide == ON_LAST_SLIDE_HOLD && + if (opt.on_last_slide == ON_LAST_SLIDE_HOLD && previous_file && ((current_file == filelist && change == SLIDE_NEXT) || (previous_file == filelist && change == SLIDE_PREV))) { current_file = previous_file; |