summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLior Shiponi <shiponi@gmail.com>2015-03-08 00:59:58 +0200
committerLior Shiponi <shiponi@gmail.com>2015-03-08 00:59:58 +0200
commit17ee23949dc04aaa31a22b1e85aabd11f6a075af (patch)
tree7cb7139551ab66ea4e30584bb4f7c5dd9f702018 /src
parentb1ff2bc056ebc6bd8d8454aa0b73bcf5fe97006b (diff)
slideshow: When removing last image, stay on the last image
Diffstat (limited to 'src')
-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