diff options
| author | Lars Ingebrigtsen | 2022-09-16 13:18:16 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-09-16 13:18:53 +0200 |
| commit | 9c0403aae0498d356c56bf972013faec61097064 (patch) | |
| tree | f0d215b353636cabaeda80ae6aa85e0ae8c99609 | |
| parent | f3277128e0e8741cf20c72c718c83e848cd92f2f (diff) | |
| download | emacs-9c0403aae0498d356c56bf972013faec61097064.tar.gz emacs-9c0403aae0498d356c56bf972013faec61097064.zip | |
Inhibit image-mode resizing in the minibuffer
* lisp/image-mode.el (image-fit-to-window): Don't resize when in
the minibuffer (bug#57823).
| -rw-r--r-- | lisp/image-mode.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/image-mode.el b/lisp/image-mode.el index bc0f7ccb048..0f1c4901591 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el | |||
| @@ -1058,7 +1058,11 @@ Otherwise, display the image by calling `image-mode'." | |||
| 1058 | 1058 | ||
| 1059 | (defun image-fit-to-window (window) | 1059 | (defun image-fit-to-window (window) |
| 1060 | "Adjust size of image to display it exactly in WINDOW boundaries." | 1060 | "Adjust size of image to display it exactly in WINDOW boundaries." |
| 1061 | (when (window-live-p window) | 1061 | (when (and (window-live-p window) |
| 1062 | ;; Don't resize anything if we're in the minibuffer | ||
| 1063 | ;; (which may transitively change the window sizes if you | ||
| 1064 | ;; hit TAB, for instance). | ||
| 1065 | (not (minibuffer-window-active-p (selected-window)))) | ||
| 1062 | (with-current-buffer (window-buffer window) | 1066 | (with-current-buffer (window-buffer window) |
| 1063 | (when (derived-mode-p 'image-mode) | 1067 | (when (derived-mode-p 'image-mode) |
| 1064 | (let ((spec (image-get-display-property))) | 1068 | (let ((spec (image-get-display-property))) |