]> git.eshelyaron.com Git - emacs.git/commitdiff
(shrink-window-if-larger-than-buffer): Don't shrink if the window that would
authorKarl Heuer <kwzh@gnu.org>
Mon, 21 Feb 1994 21:40:59 +0000 (21:40 +0000)
committerKarl Heuer <kwzh@gnu.org>
Mon, 21 Feb 1994 21:40:59 +0000 (21:40 +0000)
expand is the minibuffer.

lisp/window.el

index 5f60dd72133e7d8a0efabc914ee7c30a8c58a8b2..187d01d1cfa39a8fa400ad3343132cd4bddca7c4 100644 (file)
@@ -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))