# HG changeset patch # User Richard M. Stallman # Date 1011603332 0 # Node ID 869e78e96e2ac0c3a9f3f35f48737fc6e7f52763 # Parent 87fe94f01b8e2b8b08e33eed1f1a5423981f589c (window-body-height): Handle minibuffer window specially. Otherwise, don't return less than 1. diff -r 87fe94f01b8e -r 869e78e96e2a lisp/window.el --- a/lisp/window.el Mon Jan 21 08:53:42 2002 +0000 +++ b/lisp/window.el Mon Jan 21 08:55:32 2002 +0000 @@ -33,10 +33,12 @@ "Return number of lines in window WINDOW for actual buffer text. This does not include the mode line (if any) or the header line (if any)." (or window (setq window (selected-window))) - (with-current-buffer (window-buffer window) - (- (window-height window) - (if mode-line-format 1 0) - (if header-line-format 1 0)))) + (if (window-minibuffer-p window) + (window-height window) + (with-current-buffer (window-buffer window) + (max 1 (- (window-height window) + (if mode-line-format 1 0) + (if header-line-format 1 0)))))) (defun one-window-p (&optional nomini all-frames) "Return non-nil if the selected window is the only window (in its frame).