: 0);
}
-/* Return number of lines of text (not counting mode lines) in W. */
+/* Return number of lines of text in window W, not counting the mode
+ line and header line, if any. Do NOT use this for windows on GUI
+ frames; use window_body_height instead. This function is only for
+ windows on TTY frames, where it is much more efficient. */
int
window_internal_height (struct window *w)
{
int ht = w->total_lines;
- if (!MINI_WINDOW_P (w))
- {
- if (!NILP (w->parent)
- || WINDOWP (w->contents)
- || !NILP (w->next)
- || !NILP (w->prev)
- || window_wants_mode_line (w))
- --ht;
+ if (window_wants_mode_line (w))
+ --ht;
- if (window_wants_header_line (w))
- --ht;
- }
+ if (window_wants_header_line (w))
+ --ht;
return ht;
}