From e9c195b1a4ea82fa3d9a018ac4188aa7f7621c3a Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 9 Apr 2001 12:35:37 +0000 Subject: [PATCH] (window_internal_height): Return 1 less if the window has a header line. --- src/window.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/window.c b/src/window.c index cfedacaee83..d6538976b68 100644 --- a/src/window.c +++ b/src/window.c @@ -3856,7 +3856,7 @@ mark_window_cursors_off (w) } -/* 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 @@ window_internal_height (w) { 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; } -- 2.39.5