Mercurial > emacs
changeset 37270:9bf32a648127
(window_internal_height): Return 1 less if the
window has a header line.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 09 Apr 2001 12:35:37 +0000 |
parents | cdc3247d50f2 |
children | 0904e8f4e08a |
files | src/window.c |
diffstat | 1 files changed, 14 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/window.c Mon Apr 09 10:53:42 2001 +0000 +++ b/src/window.c Mon Apr 09 12:35:37 2001 +0000 @@ -3856,7 +3856,7 @@ } -/* Return number of lines of text (not counting mode line) in W. */ +/* Return number of lines of text (not counting mode lines) in W. */ int window_internal_height (w) @@ -3864,13 +3864,19 @@ { int ht = XFASTINT (w->height); - if (MINI_WINDOW_P (w)) - return ht; - - if (!NILP (w->parent) || !NILP (w->vchild) || !NILP (w->hchild) - || !NILP (w->next) || !NILP (w->prev) - || FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME (w)))) - return ht - 1; + if (!MINI_WINDOW_P (w)) + { + if (!NILP (w->parent) + || !NILP (w->vchild) + || !NILP (w->hchild) + || !NILP (w->next) + || !NILP (w->prev) + || WINDOW_WANTS_MODELINE_P (w)) + --ht; + + if (WINDOW_WANTS_HEADER_LINE_P (w)) + --ht; + } return ht; }