diff options
| author | Miles Bader | 2000-12-15 00:59:56 +0000 |
|---|---|---|
| committer | Miles Bader | 2000-12-15 00:59:56 +0000 |
| commit | 97dff879ca7aeb61a9d014d9cee7dd0ab173d127 (patch) | |
| tree | 660a74c9a2f4aa30689f0f3ad70b2bfb7706ac30 | |
| parent | 8f530b953cb3cbdf17d147863fd63443ef96c81a (diff) | |
| download | emacs-97dff879ca7aeb61a9d014d9cee7dd0ab173d127.tar.gz emacs-97dff879ca7aeb61a9d014d9cee7dd0ab173d127.zip | |
(window_box_height): Only use mode-line glyph-rows that are actually
marked as mode-lines; otherwise use estimate_mode_line_height.
| -rw-r--r-- | src/xdisp.c | 22 |
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 | } |