[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/line-numbers 77f8b86 03/14: Fix display of line nu
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] scratch/line-numbers 77f8b86 03/14: Fix display of line numbers with fonts larger than the default |
Date: |
Sat, 24 Jun 2017 13:12:51 -0400 (EDT) |
branch: scratch/line-numbers
commit 77f8b86e405cc0ff9c49aea5d98097212755b832
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
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.
---
src/xdisp.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index f4e8aee..39176e0 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -20849,19 +20849,16 @@ maybe_produce_line_number (struct it *it)
}
}
- /* Update IT->glyph_row's metrics. */
+ /* Update IT's metrics due to glyphs produced for line numbers. */
if (it->glyph_row)
{
struct glyph_row *row = it->glyph_row;
- row->ascent = max (row->ascent, tem_it.max_ascent);
- row->height = max (row->height,
- tem_it.max_ascent + tem_it.max_descent);
- row->phys_ascent = max (row->phys_ascent, tem_it.max_phys_ascent);
- row->phys_height = max (row->phys_height,
- tem_it.max_phys_ascent + tem_it.max_phys_descent);
- row->extra_line_spacing = max (row->extra_line_spacing,
- tem_it.max_extra_line_spacing);
+ it->max_ascent = max (row->ascent, tem_it.max_ascent);
+ it->max_descent = max (row->height - row->ascent, tem_it.max_descent);
+ it->max_phys_ascent = max (row->phys_ascent, tem_it.max_phys_ascent);
+ it->max_phys_descent = max (row->phys_height - row->phys_ascent,
+ tem_it.max_phys_descent);
}
bidi_unshelve_cache (itdata, false);
- [Emacs-diffs] scratch/line-numbers updated (7277c0f -> ead4ab6), Eli Zaretskii, 2017/06/24
- [Emacs-diffs] scratch/line-numbers 5b648ac 04/14: Fix problems with line-number updates in Follow mode, Eli Zaretskii, 2017/06/24
- [Emacs-diffs] scratch/line-numbers 77f8b86 03/14: Fix display of line numbers with fonts larger than the default,
Eli Zaretskii <=
- [Emacs-diffs] scratch/line-numbers bbaf2f3 02/14: Fix background color beyond EOB and cursor display, Eli Zaretskii, 2017/06/24
- [Emacs-diffs] scratch/line-numbers 9776d7b 05/14: Don't display line numbers in the minibuffer and in tooltip frames., Eli Zaretskii, 2017/06/24
- [Emacs-diffs] scratch/line-numbers ead4ab6 14/14: Improve documentation in NEWS., Eli Zaretskii, 2017/06/24
- [Emacs-diffs] scratch/line-numbers efedb66 08/14: Rename display-line-width, Eli Zaretskii, 2017/06/24
- [Emacs-diffs] scratch/line-numbers 13cc19a 12/14: Partial fix of hscroll of truncated lines with line numbers, Eli Zaretskii, 2017/06/24
- [Emacs-diffs] scratch/line-numbers 7d7602c 06/14: Fix crashes on TTY frames due to negative lnum_width., Eli Zaretskii, 2017/06/24
- [Emacs-diffs] scratch/line-numbers 55a9298 07/14: Fix tab stops when line numbers are displayed, Eli Zaretskii, 2017/06/24
- [Emacs-diffs] scratch/line-numbers 71a7294 10/14: Support a separate face for displaying the current line's number, Eli Zaretskii, 2017/06/24
- [Emacs-diffs] scratch/line-numbers d4eddb0 01/14: Fix display of indicate-empty-lines when line numbers are displayed, Eli Zaretskii, 2017/06/24
- [Emacs-diffs] scratch/line-numbers 0d5c713 13/14: Move additional hscrolling code into a suitable 'if', Eli Zaretskii, 2017/06/24