aboutsummaryrefslogtreecommitdiffstats
path: root/src/xdisp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xdisp.c')
-rw-r--r--src/xdisp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index c2ed64b1477..e75ae762687 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -995,13 +995,15 @@ pos_visible_p (w, charpos, fully, exact_mode_line_heights_p)
995 { 995 {
996 if (last_height) 996 if (last_height)
997 line_height = last_height; 997 line_height = last_height;
998 else 998 else if (charpos < ZV)
999 { 999 {
1000 move_it_by_lines (&it, 1, 1); 1000 move_it_by_lines (&it, 1, 1);
1001 line_height = (it.max_ascent || it.max_descent 1001 line_height = (it.max_ascent || it.max_descent
1002 ? it.max_ascent + it.max_descent 1002 ? it.max_ascent + it.max_descent
1003 : last_height); 1003 : last_height);
1004 } 1004 }
1005 else
1006 line_height = FONT_HEIGHT (FRAME_FONT (XFRAME (w->frame)));
1005 } 1007 }
1006 line_bottom_y = line_top_y + line_height; 1008 line_bottom_y = line_top_y + line_height;
1007 1009