From 909b658572e64f1f312b6b6ebd3cde3777d2cca3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerd=20M=C3=B6llmann?= Date: Tue, 5 Nov 2024 20:10:38 +0100 Subject: [PATCH] * src/dispnew.c (neutralize_wide_char): Don't use used[0] (cherry picked from commit 908a18c463bf7d2da3c39ea6141cab68fd7eac30) --- src/dispnew.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/dispnew.c b/src/dispnew.c index 8de450b22f8..b202d667611 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -3544,20 +3544,19 @@ neutralize_wide_char (struct frame *root, struct glyph_row *row, int x) if (x < 0 || x >= root->desired_matrix->matrix_w) return; - struct glyph *glyph = row->glyphs[0] + x; + struct glyph *glyph = row->glyphs[TEXT_AREA] + x; if (glyph->type == CHAR_GLYPH && CHARACTER_WIDTH (glyph->u.ch) > 1) { - struct glyph *row_start = row->glyphs[0]; - struct glyph *row_limit = row_start + row->used[0]; - /* Glyph is somewhere in a sequence of glyphs for a wide character, find the start. */ + struct glyph *row_start = row->glyphs[TEXT_AREA]; while (glyph > row_start && glyph->padding_p) --glyph; /* Make everything in the sequence a space glyph. */ eassert (!glyph->padding_p); make_glyph_space (glyph); + struct glyph *row_limit = row_start + row->used[TEXT_AREA]; for (++glyph; glyph < row_limit && glyph->padding_p; ++glyph) make_glyph_space (glyph); } -- 2.39.5