summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2022-09-26 21:10:58 +0200
committerStefan Kangas <stefankangas@gmail.com>2022-09-26 21:10:58 +0200
commitbb83fb5f62aa4b27a5598f4a0a9b22efdd94cf14 (patch)
treea18c30753a5987d99a1b94adfd6533706ad6a84f
parent6d0fec5ae084f8b0b8564d66f61f2ea742ee1d8b (diff)
downloademacs-bb83fb5f62aa4b27a5598f4a0a9b22efdd94cf14.tar.gz
Don't auto-resize image if echo area is non-empty
* lisp/image-mode.el (image-fit-to-window): Don't auto-resize image if there's a message in the echo area.
-rw-r--r--lisp/image-mode.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index eee4be6a10e..bd208fbad46 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -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)))