emacs-diffs
[Top][All Lists]
Advanced

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

master 09081ca: Fix a typo in 'produce_glyphless_glyph'


From: Eli Zaretskii
Subject: master 09081ca: Fix a typo in 'produce_glyphless_glyph'
Date: Wed, 2 Jun 2021 09:15:54 -0400 (EDT)

branch: master
commit 09081ca119c3debcc72159a46d3bafabfd7519bb
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix a typo in 'produce_glyphless_glyph'
    
    * src/xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
    Remove workaround for lack of its initialization.  (Bug#8215)
---
 src/xdisp.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 4841a0a..0a95aa3 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -30290,7 +30290,7 @@ produce_glyphless_glyph (struct it *it, bool 
for_no_font, Lisp_Object acronym)
 
       /* +4 is for vertical bars of a box plus 1-pixel spaces at both side.  */
       width = max (metrics_upper.width, metrics_lower.width) + 4;
-      upper_xoff = upper_yoff = 2; /* the typical case */
+      upper_xoff = lower_xoff = 2; /* the typical case */
       if (base_width >= width)
        {
          /* Align the upper to the left, the lower to the right.  */
@@ -30304,13 +30304,7 @@ produce_glyphless_glyph (struct it *it, bool 
for_no_font, Lisp_Object acronym)
          if (metrics_upper.width >= metrics_lower.width)
            lower_xoff = (width - metrics_lower.width) / 2;
          else
-           {
-             /* FIXME: This code doesn't look right.  It formerly was
-                missing the "lower_xoff = 0;", which couldn't have
-                been right since it left lower_xoff uninitialized.  */
-             lower_xoff = 0;
-             upper_xoff = (width - metrics_upper.width) / 2;
-           }
+           upper_xoff = (width - metrics_upper.width) / 2;
        }
 
       /* +5 is for horizontal bars of a box plus 1-pixel spaces at



reply via email to

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