summaryrefslogtreecommitdiff
path: root/lisp/window.el
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-03-08 15:03:44 +0000
committerGerd Moellmann <gerd@gnu.org>2001-03-08 15:03:44 +0000
commitf92c5e7d08c92f57cf6e30b8ab5b63bdc296ac6b (patch)
treed22d6e64b1e8210dfacb351725d08e2f9b28d6c1 /lisp/window.el
parentf69f9da11ea89257d06ceaf8d927bbf5e1688566 (diff)
downloademacs-f92c5e7d08c92f57cf6e30b8ab5b63bdc296ac6b.tar.gz
(shrink-window-if-larger-than-buffer): Handle frame
parameter `(minibuffer . t)'.
Diffstat (limited to 'lisp/window.el')
-rw-r--r--lisp/window.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/window.el b/lisp/window.el
index e6a99180930..e3d451c5382 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -1,6 +1,6 @@
;;; window.el --- GNU Emacs window commands aside from those written in C.
-;; Copyright (C) 1985, 1989, 1992, 1993, 1994, 2000
+;; Copyright (C) 1985, 1989, 1992, 1993, 1994, 2000, 2001
;; Free Software Foundation, Inc.
;; Maintainer: FSF
@@ -472,8 +472,13 @@ Return non-nil if the window was shrunk."
(pos-visible-in-window-p (point-min) window)
(not (eq mini 'only))
(or (not mini)
- (< (nth 3 edges) (nth 1 (window-edges mini)))
- (> (nth 1 edges) (frame-parameter frame 'menu-bar-lines))))
+ (let ((mini-window (minibuffer-window frame)))
+ (or (null mini-window)
+ (not (eq frame (window-frame mini-window)))
+ (< (nth 3 edges)
+ (nth 1 (window-edges mini-window)))
+ (> (nth 1 edges)
+ (frame-parameter frame 'menu-bar-lines))))))
(fit-window-to-buffer window (window-height window)))))
(defun kill-buffer-and-window ()