From d77e4f0a32866f164556e9de8faec3923c7b314e Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 5 Sep 2017 00:03:20 +0200 Subject: Remove image from filelist if it was removed by an action (closes #322) --- src/keyevents.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/keyevents.c b/src/keyevents.c index 7b0923a..a6833a6 100644 --- a/src/keyevents.c +++ b/src/keyevents.c @@ -234,12 +234,15 @@ static short feh_is_kp(fehkey *key, unsigned int state, unsigned int sym, unsign void feh_event_invoke_action(winwidget winwid, unsigned char action) { + struct stat st; if (opt.actions[action]) { if (opt.slideshow) { feh_action_run(FEH_FILE(winwid->file->data), opt.actions[action], winwid); if (opt.hold_actions[action]) feh_reload_image(winwid, 1, 1); + else if (stat(FEH_FILE(winwid->file->data)->filename, &st) == -1) + feh_filelist_image_remove(winwid, 0); else slideshow_change_image(winwid, SLIDE_NEXT, 1); -- cgit v1.2.3