From: Lars Ingebrigtsen Date: Wed, 14 Sep 2022 14:04:23 +0000 (+0200) Subject: Make image cropping work in image-mode buffers X-Git-Tag: emacs-29.0.90~1856^2~512 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=576eba77d3798dde08ae575ab5a47ea48fc1f185;p=emacs.git Make image cropping work in image-mode buffers * lisp/image-mode.el (image-mode): Update the buffer text after cropping (bug#57793). --- 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