summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-09-14 16:04:23 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-09-14 16:04:52 +0200
commit576eba77d3798dde08ae575ab5a47ea48fc1f185 (patch)
tree168cedccb919bba5cfc697aa2c728c20aceff87c
parent997284d2a506dbaf80005dba5e8696d28dc9a0c3 (diff)
downloademacs-576eba77d3798dde08ae575ab5a47ea48fc1f185.tar.gz
Make image cropping work in image-mode buffers
* lisp/image-mode.el (image-mode): Update the buffer text after cropping (bug#57793).
-rw-r--r--lisp/image-mode.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index dded6d4f389..bc0f7ccb048 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -667,6 +667,9 @@ Key bindings:
"(New file)")
"Empty buffer"))
(image-mode--display)
+ (setq-local image-crop-buffer-text-function
+ ;; Use the binary image data directly for the buffer text.
+ (lambda (_text image) image))
;; Ensure that we recognize externally parsed image formats in
;; commands like `n'.
(when image-use-external-converter