Mercurial > emacs
changeset 34578:cd90170bc811
(window_box_height): Only use mode-line glyph-rows that are actually
marked as mode-lines; otherwise use estimate_mode_line_height.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 15 Dec 2000 00:59:56 +0000 |
parents | 57befc9b6311 |
children | 432f2f4182cd |
files | src/xdisp.c |
diffstat | 1 files changed, 20 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xdisp.c Thu Dec 14 17:30:34 2000 +0000 +++ b/src/xdisp.c Fri Dec 15 00:59:56 2000 +0000 @@ -843,10 +843,28 @@ xassert (height >= 0); if (WINDOW_WANTS_MODELINE_P (w)) - height -= CURRENT_MODE_LINE_HEIGHT (w); + { + struct glyph_row *ml_row + = (w->current_matrix && w->current_matrix->rows + ? MATRIX_MODE_LINE_ROW (w->current_matrix) + : 0); + if (ml_row && ml_row->mode_line_p) + height -= ml_row->height; + else + height -= estimate_mode_line_height (f, MODE_LINE_FACE_ID); + } if (WINDOW_WANTS_HEADER_LINE_P (w)) - height -= CURRENT_HEADER_LINE_HEIGHT (w); + { + struct glyph_row *hl_row + = (w->current_matrix && w->current_matrix->rows + ? MATRIX_HEADER_LINE_ROW (w->current_matrix) + : 0); + if (hl_row && hl_row->mode_line_p) + height -= hl_row->height; + else + height -= estimate_mode_line_height (f, HEADER_LINE_FACE_ID); + } return height; }