changeset 6019:0c0b00572d96

(shrink-window-if-larger-than-buffer): Don't shrink if the window that would expand is the minibuffer.
author Karl Heuer <kwzh@gnu.org>
date Mon, 21 Feb 1994 21:40:59 +0000
parents 51d9a0c72a29
children f6fd4af42002
files lisp/window.el
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/window.el	Mon Feb 21 06:46:09 1994 +0000
+++ b/lisp/window.el	Mon Feb 21 21:40:59 1994 +0000
@@ -156,9 +156,16 @@
 	  (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))