aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/xdisp.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 11859e8d85b..f4324caa9bc 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -843,10 +843,28 @@ window_box_height (w)
843 xassert (height >= 0); 843 xassert (height >= 0);
844 844
845 if (WINDOW_WANTS_MODELINE_P (w)) 845 if (WINDOW_WANTS_MODELINE_P (w))
846 height -= CURRENT_MODE_LINE_HEIGHT (w); 846 {
847 struct glyph_row *ml_row
848 = (w->current_matrix && w->current_matrix->rows
849 ? MATRIX_MODE_LINE_ROW (w->current_matrix)
850 : 0);
851 if (ml_row && ml_row->mode_line_p)
852 height -= ml_row->height;
853 else
854 height -= estimate_mode_line_height (f, MODE_LINE_FACE_ID);
855 }
847 856
848 if (WINDOW_WANTS_HEADER_LINE_P (w)) 857 if (WINDOW_WANTS_HEADER_LINE_P (w))
849 height -= CURRENT_HEADER_LINE_HEIGHT (w); 858 {
859 struct glyph_row *hl_row
860 = (w->current_matrix && w->current_matrix->rows
861 ? MATRIX_HEADER_LINE_ROW (w->current_matrix)
862 : 0);
863 if (hl_row && hl_row->mode_line_p)
864 height -= hl_row->height;
865 else
866 height -= estimate_mode_line_height (f, HEADER_LINE_FACE_ID);
867 }
850 868
851 return height; 869 return height;
852} 870}