emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 79150f6: Fix line-pixel-height for lines of variabl


From: Eli Zaretskii
Subject: [Emacs-diffs] master 79150f6: Fix line-pixel-height for lines of variable height
Date: Fri, 8 Sep 2017 09:16:49 -0400 (EDT)

branch: master
commit 79150f6086286294c9e5ed56df5b14c87129cde6
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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)
---
 src/xdisp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/xdisp.c b/src/xdisp.c
index ad9b298..5e8188c 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));



reply via email to

[Prev in Thread] Current Thread [Next in Thread]