emacs-diffs
[Top][All Lists]
Advanced

[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);



reply via email to

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