[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6fb4f4ad80 2/2: Inhibit image-crop when there's overlays
From: |
Lars Ingebrigtsen |
Subject: |
master 6fb4f4ad80 2/2: Inhibit image-crop when there's overlays |
Date: |
Fri, 23 Sep 2022 11:38:26 -0400 (EDT) |
branch: master
commit 6fb4f4ad80a660200365b57f22b3912e59ffe9dd
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Inhibit image-crop when there's overlays
* lisp/image/image-crop.el (image-crop): Don't mess with overlays,
because they're a pain to reconstruct (bug#58027).
---
lisp/image/image-crop.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lisp/image/image-crop.el b/lisp/image/image-crop.el
index 8ec4679b9b..61ed7e1db1 100644
--- a/lisp/image/image-crop.el
+++ b/lisp/image/image-crop.el
@@ -143,6 +143,8 @@ After cropping an image, you can save it by `M-x
image-save' or
(let ((image (get-text-property (point) 'display)))
(unless (imagep image)
(user-error "No image under point"))
+ (when (overlays-at (point))
+ (user-error "Can't edit images that have overlays"))
;; We replace the image under point with an SVG image that looks
;; just like that image. That allows us to draw lines over it.
;; At the end, we replace that SVG with a cropped version of the