aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2005-01-23 00:50:52 +0000
committerKim F. Storm2005-01-23 00:50:52 +0000
commit78465f3a8c37972ebff48b6c961196472fceef16 (patch)
tree5c7e32e5fc3ff476b01b67a866a91a39cd77dcb2 /src
parentbed83ee4dd0caeb301232cf56dcc8e7f62406bba (diff)
downloademacs-78465f3a8c37972ebff48b6c961196472fceef16.tar.gz
emacs-78465f3a8c37972ebff48b6c961196472fceef16.zip
(pos_visible_p): Fix calculation of y.
Clear last_height before calling line_bottom_y to get real height.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 17ee38f6fc0..f1877c494cb 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1292,7 +1292,7 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p)
1292 if (IT_CHARPOS (it) >= charpos) 1292 if (IT_CHARPOS (it) >= charpos)
1293 { 1293 {
1294 int top_y = it.current_y; 1294 int top_y = it.current_y;
1295 int bottom_y = line_bottom_y (&it); 1295 int bottom_y = (last_height = 0, line_bottom_y (&it));
1296 int window_top_y = WINDOW_HEADER_LINE_HEIGHT (w); 1296 int window_top_y = WINDOW_HEADER_LINE_HEIGHT (w);
1297 1297
1298 if (top_y < window_top_y) 1298 if (top_y < window_top_y)
@@ -1302,7 +1302,7 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p)
1302 if (visible_p && x) 1302 if (visible_p && x)
1303 { 1303 {
1304 *x = it.current_x; 1304 *x = it.current_x;
1305 *y = max (top_y + it.max_ascent - it.ascent, window_top_y); 1305 *y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y);
1306 if (rtop) 1306 if (rtop)
1307 { 1307 {
1308 *rtop = max (0, window_top_y - top_y); 1308 *rtop = max (0, window_top_y - top_y);