Permalink
Browse files

work around last image deletion bug with --cycle-once (closes #107)

  • Loading branch information...
1 parent f40b636 commit fcd11729ed161588e7ca60e7c5023ae56672a1e3 @derf committed Dec 6, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/slideshow.c
View
8 src/slideshow.c
@@ -555,6 +555,14 @@ void feh_filelist_image_remove(winwidget winwid, char do_delete)
gib_list *doomed;
doomed = current_file;
+ /*
+ * work around feh_list_jump exiting if cycle_once is enabled
+ * and no further files are left (we need to delete first)
+ */
+ if (opt.cycle_once && ! doomed->next && do_delete) {
+ feh_file_rm_and_free(filelist, doomed);
+ exit(0);
+ }
slideshow_change_image(winwid, SLIDE_NEXT, 0);
if (do_delete)
filelist = feh_file_rm_and_free(filelist, doomed);

0 comments on commit fcd1172

Please sign in to comment.