From: Karl Heuer Date: Mon, 21 Feb 1994 21:40:59 +0000 (+0000) Subject: (shrink-window-if-larger-than-buffer): Don't shrink if the window that would X-Git-Tag: emacs-19.34~9833 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5e2ec73efba99956ac53378f34fc3c18c4951826;p=emacs.git (shrink-window-if-larger-than-buffer): Don't shrink if the window that would expand is the minibuffer. --- diff --git a/lisp/window.el b/lisp/window.el index 5f60dd72133..187d01d1cfa 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -156,9 +156,16 @@ or if the window is the only window of its frame." (window-min-height 0) (buffer-read-only nil) (modified (buffer-modified-p)) - (buffer (current-buffer))) + (buffer (current-buffer)) + (mini (cdr (assq 'minibuffer (frame-parameters)))) + (edges (window-edges (selected-window)))) (if (and (< 1 (count-windows)) - (pos-visible-in-window-p (point-min) window)) + (pos-visible-in-window-p (point-min) window) + (or (not mini) + (< (nth 3 edges) + (nth 1 (window-edges mini))) + (> (nth 1 edges) + (cdr (assq 'menu-bar-lines (frame-parameters)))))) (unwind-protect (progn (select-window (or window w))