summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-09-05 00:03:20 +0200
committerDaniel Friesel <derf@finalrewind.org>2017-09-05 00:03:20 +0200
commitd77e4f0a32866f164556e9de8faec3923c7b314e (patch)
tree05edb1fef4a12499fe426a0ec7169a554a44c546
parent8ad7d16318975a46aaada5c2b4ecf22c089b88f5 (diff)
Remove image from filelist if it was removed by an action (closes #322)
-rw-r--r--src/keyevents.c3
1 files changed, 3 insertions, 0 deletions
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);