Commit 79150f60 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Fix line-pixel-height for lines of variable height

* src/xdisp.c (Fline_pixel_height): Start moving from the
beginning of the screen line, to capture the full metrics of the
line.  (Bug#28391)
parent 5f31879e
...@@ -1195,6 +1195,10 @@ Value is the height in pixels of the line at point. */) ...@@ -1195,6 +1195,10 @@ Value is the height in pixels of the line at point. */)
} }
SET_TEXT_POS (pt, PT, PT_BYTE); SET_TEXT_POS (pt, PT, PT_BYTE);
start_display (&it, w, pt); start_display (&it, w, pt);
/* Start from the beginning of the screen line, to make sure we
traverse all of its display elements, and thus capture the
correct metrics. */
move_it_by_lines (&it, 0);
it.vpos = it.current_y = 0; it.vpos = it.current_y = 0;
last_height = 0; last_height = 0;
result = make_number (line_bottom_y (&it)); result = make_number (line_bottom_y (&it));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment