diff options
author | Lior Shiponi <shiponi@gmail.com> | 2015-03-08 00:59:58 +0200 |
---|---|---|
committer | Lior Shiponi <shiponi@gmail.com> | 2015-03-08 00:59:58 +0200 |
commit | 17ee23949dc04aaa31a22b1e85aabd11f6a075af (patch) | |
tree | 7cb7139551ab66ea4e30584bb4f7c5dd9f702018 /src | |
parent | b1ff2bc056ebc6bd8d8454aa0b73bcf5fe97006b (diff) |
slideshow: When removing last image, stay on the last image
Diffstat (limited to 'src')
-rw-r--r-- | src/slideshow.c | 7 |
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 |