summaryrefslogtreecommitdiff
path: root/lisp/window.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2002-01-21 08:55:32 +0000
committerRichard M. Stallman <rms@gnu.org>2002-01-21 08:55:32 +0000
commit9df6e63856819419f55926833c93231aa24ec8d3 (patch)
tree9d540d768b7ea3366704658031624c7bdf872c3f /lisp/window.el
parent54b8bcb515a96a1c6ef304809fd9087d3b73c653 (diff)
downloademacs-9df6e63856819419f55926833c93231aa24ec8d3.tar.gz
(window-body-height): Handle minibuffer window specially.
Otherwise, don't return less than 1.
Diffstat (limited to 'lisp/window.el')
-rw-r--r--lisp/window.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/window.el b/lisp/window.el
index 99b71dba77c..02b3fa1ffe3 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -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).