summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/slideshow.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/slideshow.c b/src/slideshow.c
index 08db2cb..6c5d9c8 100644
--- a/src/slideshow.c
+++ b/src/slideshow.c
@@ -621,7 +621,12 @@ void feh_filelist_image_remove(winwidget winwid, char do_delete)
feh_file_rm_and_free(filelist, doomed);
exit(0);
}
- slideshow_change_image(winwid, SLIDE_NEXT, 0);
+ if (doomed->next) {
+ slideshow_change_image(winwid, SLIDE_NEXT, 0);
+ }
+ else {
+ slideshow_change_image(winwid, SLIDE_PREV, 0);
+ }
if (do_delete)
filelist = feh_file_rm_and_free(filelist, doomed);
else