# HG changeset patch # User Kim F. Storm # Date 1106441452 0 # Node ID 6ecba179adb271927d497fd21220bfe55eb8231f # Parent 75b50deae4e97a774f32f0d50b1ba9f78aaac010 (pos_visible_p): Fix calculation of y. Clear last_height before calling line_bottom_y to get real height. diff -r 75b50deae4e9 -r 6ecba179adb2 src/xdisp.c --- a/src/xdisp.c Sun Jan 23 00:50:24 2005 +0000 +++ b/src/xdisp.c Sun Jan 23 00:50:52 2005 +0000 @@ -1292,7 +1292,7 @@ if (IT_CHARPOS (it) >= charpos) { int top_y = it.current_y; - int bottom_y = line_bottom_y (&it); + int bottom_y = (last_height = 0, line_bottom_y (&it)); int window_top_y = WINDOW_HEADER_LINE_HEIGHT (w); if (top_y < window_top_y) @@ -1302,7 +1302,7 @@ if (visible_p && x) { *x = it.current_x; - *y = max (top_y + it.max_ascent - it.ascent, window_top_y); + *y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y); if (rtop) { *rtop = max (0, window_top_y - top_y);