Commit e9c195b1 authored by Gerd Moellmann's avatar Gerd Moellmann

(window_internal_height): Return 1 less if the

window has a header line.
parent ceeb3d7d
...@@ -3856,7 +3856,7 @@ mark_window_cursors_off (w) ...@@ -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 int
window_internal_height (w) window_internal_height (w)
...@@ -3864,13 +3864,19 @@ window_internal_height (w) ...@@ -3864,13 +3864,19 @@ window_internal_height (w)
{ {
int ht = XFASTINT (w->height); int ht = XFASTINT (w->height);
if (MINI_WINDOW_P (w)) if (!MINI_WINDOW_P (w))
return ht; {
if (!NILP (w->parent)
if (!NILP (w->parent) || !NILP (w->vchild) || !NILP (w->hchild) || !NILP (w->vchild)
|| !NILP (w->next) || !NILP (w->prev) || !NILP (w->hchild)
|| FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME (w)))) || !NILP (w->next)
return ht - 1; || !NILP (w->prev)
|| WINDOW_WANTS_MODELINE_P (w))
--ht;
if (WINDOW_WANTS_HEADER_LINE_P (w))
--ht;
}
return ht; return ht;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment