diff options
| author | Eli Zaretskii | 2017-09-08 16:15:23 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-09-08 16:15:23 +0300 |
| commit | 79150f6086286294c9e5ed56df5b14c87129cde6 (patch) | |
| tree | 1674232760b26ea2b13229c9d47ad869c48a636e /src | |
| parent | 5f31879e16226382b6d598b6e0a42ab24f255c8f (diff) | |
| download | emacs-79150f6086286294c9e5ed56df5b14c87129cde6.tar.gz emacs-79150f6086286294c9e5ed56df5b14c87129cde6.zip | |
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)
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 4 |
1 files changed, 4 insertions, 0 deletions
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. */) | |||
| 1195 | } | 1195 | } |
| 1196 | SET_TEXT_POS (pt, PT, PT_BYTE); | 1196 | SET_TEXT_POS (pt, PT, PT_BYTE); |
| 1197 | start_display (&it, w, pt); | 1197 | start_display (&it, w, pt); |
| 1198 | /* Start from the beginning of the screen line, to make sure we | ||
| 1199 | traverse all of its display elements, and thus capture the | ||
| 1200 | correct metrics. */ | ||
| 1201 | move_it_by_lines (&it, 0); | ||
| 1198 | it.vpos = it.current_y = 0; | 1202 | it.vpos = it.current_y = 0; |
| 1199 | last_height = 0; | 1203 | last_height = 0; |
| 1200 | result = make_number (line_bottom_y (&it)); | 1204 | result = make_number (line_bottom_y (&it)); |