emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 9c0403aae0: Inhibit image-mode resizing in the minibuffer


From: Lars Ingebrigtsen
Subject: master 9c0403aae0: Inhibit image-mode resizing in the minibuffer
Date: Fri, 16 Sep 2022 07:18:59 -0400 (EDT)

branch: master
commit 9c0403aae0498d356c56bf972013faec61097064
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Inhibit image-mode resizing in the minibuffer
    
    * lisp/image-mode.el (image-fit-to-window): Don't resize when in
    the minibuffer (bug#57823).
---
 lisp/image-mode.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index bc0f7ccb04..0f1c490159 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -1058,7 +1058,11 @@ Otherwise, display the image by calling `image-mode'."
 
 (defun image-fit-to-window (window)
   "Adjust size of image to display it exactly in WINDOW boundaries."
-  (when (window-live-p window)
+  (when (and (window-live-p window)
+             ;; 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))))
     (with-current-buffer (window-buffer window)
       (when (derived-mode-p 'image-mode)
         (let ((spec (image-get-display-property)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]