diff options
| author | Eli Zaretskii | 2017-06-24 11:34:52 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-06-24 11:34:52 +0300 |
| commit | 77f8b86e405cc0ff9c49aea5d98097212755b832 (patch) | |
| tree | 5b42a9eb87afdf9e231c2ae8ac84d9c7872fb6e6 /src | |
| parent | bbaf2f3d529ac3f8d72b671ee3a8a0c3347c5510 (diff) | |
| download | emacs-77f8b86e405cc0ff9c49aea5d98097212755b832.tar.gz emacs-77f8b86e405cc0ff9c49aea5d98097212755b832.zip | |
Fix display of line numbers with fonts larger than the default
* src/xdisp.c (maybe_produce_line_number): Update the metrics in
IT, not in IT->glyph_row, since the latter gets overwritten in
display_line. Fixes display of line numbers when the font used
for them is larger than that of the default face.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index f4e8aeee390..39176e0e675 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -20849,19 +20849,16 @@ maybe_produce_line_number (struct it *it) | |||
| 20849 | } | 20849 | } |
| 20850 | } | 20850 | } |
| 20851 | 20851 | ||
| 20852 | /* Update IT->glyph_row's metrics. */ | 20852 | /* Update IT's metrics due to glyphs produced for line numbers. */ |
| 20853 | if (it->glyph_row) | 20853 | if (it->glyph_row) |
| 20854 | { | 20854 | { |
| 20855 | struct glyph_row *row = it->glyph_row; | 20855 | struct glyph_row *row = it->glyph_row; |
| 20856 | 20856 | ||
| 20857 | row->ascent = max (row->ascent, tem_it.max_ascent); | 20857 | it->max_ascent = max (row->ascent, tem_it.max_ascent); |
| 20858 | row->height = max (row->height, | 20858 | it->max_descent = max (row->height - row->ascent, tem_it.max_descent); |
| 20859 | tem_it.max_ascent + tem_it.max_descent); | 20859 | it->max_phys_ascent = max (row->phys_ascent, tem_it.max_phys_ascent); |
| 20860 | row->phys_ascent = max (row->phys_ascent, tem_it.max_phys_ascent); | 20860 | it->max_phys_descent = max (row->phys_height - row->phys_ascent, |
| 20861 | row->phys_height = max (row->phys_height, | 20861 | tem_it.max_phys_descent); |
| 20862 | tem_it.max_phys_ascent + tem_it.max_phys_descent); | ||
| 20863 | row->extra_line_spacing = max (row->extra_line_spacing, | ||
| 20864 | tem_it.max_extra_line_spacing); | ||
| 20865 | } | 20862 | } |
| 20866 | 20863 | ||
| 20867 | bidi_unshelve_cache (itdata, false); | 20864 | bidi_unshelve_cache (itdata, false); |