]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't auto-resize image if echo area is non-empty
authorStefan Kangas <stefankangas@gmail.com>
Mon, 26 Sep 2022 19:10:58 +0000 (21:10 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Mon, 26 Sep 2022 19:10:58 +0000 (21:10 +0200)
* lisp/image-mode.el (image-fit-to-window): Don't auto-resize
image if there's a message in the echo area.

lisp/image-mode.el

index eee4be6a10e9ff995cbf264c892e14c8c0af626a..bd208fbad466cd4c3528cf2f8045bb1cadebd43c 100644 (file)
@@ -1061,7 +1061,9 @@ Otherwise, display the image by calling `image-mode'."
              ;; Don't resize anything if we're in the minibuffer
              ;; (which may transitively change the window sizes if you
              ;; hit TAB, for instance).
-             (not (minibuffer-window-active-p (selected-window))))
+             (not (minibuffer-window-active-p (selected-window)))
+             ;; Don't resize if there's a message in the echo area.
+             (not (current-message)))
     (with-current-buffer (window-buffer window)
       (when (derived-mode-p 'image-mode)
         (let ((spec (image-get-display-property)))