]> git.eshelyaron.com Git - emacs.git/commitdiff
Make image-dired-delete-marked more resilient
authorPeter Münster <pm@a16n.net>
Thu, 20 Jan 2022 14:16:46 +0000 (15:16 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 20 Jan 2022 14:16:46 +0000 (15:16 +0100)
* lisp/image-dired.el (image-dired-delete-marked): Don't bug out
on empty buffers (bug#53385).

lisp/image-dired.el

index b81df8567bd4436f5ffe14fee1489dfb6a54dcd5..9b0bbb70df91e455c6eed7ddb9b2b2276facf989 100644 (file)
@@ -2353,7 +2353,8 @@ for deletion instead."
   (interactive)
   (image-dired--with-marked
    (image-dired-delete-char)
-   (backward-char))
+   (unless (bobp)
+     (backward-char)))
   (image-dired--line-up-with-method)
   (with-current-buffer (image-dired-associated-dired-buffer)
     (dired-do-delete)))