From: Gerd Moellmann Date: Mon, 9 Apr 2001 12:35:37 +0000 (+0000) Subject: (window_internal_height): Return 1 less if the X-Git-Tag: emacs-pretest-21.0.103~270 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e9c195b1a4ea82fa3d9a018ac4188aa7f7621c3a;p=emacs.git (window_internal_height): Return 1 less if the window has a header line. --- 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; }