From bf64342a8ffd8777df10051037ca13ec4f6857a5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20M=C3=BCnster?= Date: Tue, 17 Aug 2021 00:19:08 +0200 Subject: [PATCH] Fix deletion of associated image * lisp/image-dired.el (image-dired-delete-marked): Treat original images first, because point position is used when there are no marked files. --- lisp/image-dired.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 1e1614af9b6..9455ab1ff08 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -2313,14 +2313,14 @@ non-nil." (image-dired-dired-file-marked-p)))))) (defun image-dired-delete-marked () - "Delete marked thumbnails and associated images." + "Delete current or marked thumbnails and associated images." (interactive) + (with-current-buffer (image-dired-associated-dired-buffer) + (dired-do-delete)) (image-dired--with-marked (image-dired-delete-char) (backward-char)) - (image-dired--line-up-with-method) - (with-current-buffer (image-dired-associated-dired-buffer) - (dired-do-delete))) + (image-dired--line-up-with-method)) (defun image-dired-thumb-update-marks () "Update the marks in the thumbnail buffer." -- 2.39.2