summaryrefslogtreecommitdiff
path: root/lisp/window.el
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1994-02-21 21:40:59 +0000
committerKarl Heuer <kwzh@gnu.org>1994-02-21 21:40:59 +0000
commitc88581089adeb551e0507a84c9eb42a3c5e5bae5 (patch)
tree39433951ec7f7c228506f938a65bfef700fe15a7 /lisp/window.el
parent05a164f595d44dead79f01b0b8b223930f1d4d9d (diff)
downloademacs-c88581089adeb551e0507a84c9eb42a3c5e5bae5.tar.gz
(shrink-window-if-larger-than-buffer): Don't shrink if the window that would
expand is the minibuffer.
Diffstat (limited to 'lisp/window.el')
-rw-r--r--lisp/window.el11
1 files changed, 9 insertions, 2 deletions
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))