diff options
| author | Eli Zaretskii | 2021-06-02 16:14:14 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2021-06-02 16:14:14 +0300 |
| commit | 09081ca119c3debcc72159a46d3bafabfd7519bb (patch) | |
| tree | 00196cf8156f05b566dd03148fd4d3c74130715b | |
| parent | 87e7390aaef0978bdef6f3b73af43305fab7db21 (diff) | |
| download | emacs-09081ca119c3debcc72159a46d3bafabfd7519bb.tar.gz emacs-09081ca119c3debcc72159a46d3bafabfd7519bb.zip | |
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)
| -rw-r--r-- | src/xdisp.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 4841a0af6f3..0a95aa32f94 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) | |||
| 30290 | 30290 | ||
| 30291 | /* +4 is for vertical bars of a box plus 1-pixel spaces at both side. */ | 30291 | /* +4 is for vertical bars of a box plus 1-pixel spaces at both side. */ |
| 30292 | width = max (metrics_upper.width, metrics_lower.width) + 4; | 30292 | width = max (metrics_upper.width, metrics_lower.width) + 4; |
| 30293 | upper_xoff = upper_yoff = 2; /* the typical case */ | 30293 | upper_xoff = lower_xoff = 2; /* the typical case */ |
| 30294 | if (base_width >= width) | 30294 | if (base_width >= width) |
| 30295 | { | 30295 | { |
| 30296 | /* Align the upper to the left, the lower to the right. */ | 30296 | /* 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) | |||
| 30304 | if (metrics_upper.width >= metrics_lower.width) | 30304 | if (metrics_upper.width >= metrics_lower.width) |
| 30305 | lower_xoff = (width - metrics_lower.width) / 2; | 30305 | lower_xoff = (width - metrics_lower.width) / 2; |
| 30306 | else | 30306 | else |
| 30307 | { | 30307 | upper_xoff = (width - metrics_upper.width) / 2; |
| 30308 | /* FIXME: This code doesn't look right. It formerly was | ||
| 30309 | missing the "lower_xoff = 0;", which couldn't have | ||
| 30310 | been right since it left lower_xoff uninitialized. */ | ||
| 30311 | lower_xoff = 0; | ||
| 30312 | upper_xoff = (width - metrics_upper.width) / 2; | ||
| 30313 | } | ||
| 30314 | } | 30308 | } |
| 30315 | 30309 | ||
| 30316 | /* +5 is for horizontal bars of a box plus 1-pixel spaces at | 30310 | /* +5 is for horizontal bars of a box plus 1-pixel spaces at |