Make image cropping work in image-mode buffers

* lisp/image-mode.el (image-mode): Update the buffer text after
cropping (bug#57793).
This commit is contained in:
Lars Ingebrigtsen 2022-09-14 16:04:23 +02:00
parent 997284d2a5
commit 576eba77d3

View file

@ -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