Fix point movement in image-dired

* lisp/image-dired.el (image-dired-thumb-file-marked-p): Don't
move point in associated dired buffer.
(image-dired-delete-marked): Revert "Fix deletion of associated image"
because it was wrong and introduced another problem (bug#51152).
This commit is contained in:
Peter Münster 2021-10-12 14:31:58 +02:00 committed by Lars Ingebrigtsen
parent 4e9452a399
commit 3eac7dc780

View file

@ -2314,18 +2314,19 @@ non-nil."
(dired-buf (image-dired-associated-dired-buffer)))
(when (and dired-buf file-name)
(with-current-buffer dired-buf
(when (dired-goto-file file-name)
(image-dired-dired-file-marked-p))))))
(save-excursion
(when (dired-goto-file file-name)
(image-dired-dired-file-marked-p)))))))
(defun image-dired-delete-marked ()
"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))
(image-dired--line-up-with-method)
(with-current-buffer (image-dired-associated-dired-buffer)
(dired-do-delete)))
(defun image-dired-thumb-update-marks ()
"Update the marks in the thumbnail buffer."