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)
This commit is contained in:
Eli Zaretskii 2021-06-02 16:14:14 +03:00
parent 87e7390aae
commit 09081ca119

View file

@ -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