From: Eli Zaretskii Date: Fri, 8 Sep 2017 13:15:23 +0000 (+0300) Subject: Fix line-pixel-height for lines of variable height X-Git-Tag: emacs-26.0.90~225 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=79150f6086286294c9e5ed56df5b14c87129cde6;p=emacs.git 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) --- diff --git a/src/xdisp.c b/src/xdisp.c index ad9b29835e7..5e8188cacb9 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1195,6 +1195,10 @@ Value is the height in pixels of the line at point. */) } SET_TEXT_POS (pt, PT, PT_BYTE); 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; last_height = 0; result = make_number (line_bottom_y (&it));