summaryrefslogtreecommitdiff
path: root/src/slideshow.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/slideshow.c')
-rw-r--r--src/slideshow.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/slideshow.c b/src/slideshow.c
index e42bd23..7636d31 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