# HG changeset patch
# User Gerd Moellmann <gerd@gnu.org>
# Date 986819737 0
# Node ID 9bf32a64812721f0097311121c9f4b483201731d
# Parent  cdc3247d50f240bef5388d3d37dbb318d8271c99
(window_internal_height): Return 1 less if the
window has a header line.

diff -r cdc3247d50f2 -r 9bf32a648127 src/window.c
--- 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;
 }