aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Möllmann2024-11-05 20:10:38 +0100
committerGerd Möllmann2024-11-05 20:12:56 +0100
commit908a18c463bf7d2da3c39ea6141cab68fd7eac30 (patch)
treed16df1f4caf8e972c6909c42d4a3c551cac458c6
parent56efab930b5c129aa9c87f99f657b7d704c6d5f9 (diff)
downloademacs-908a18c463bf7d2da3c39ea6141cab68fd7eac30.tar.gz
emacs-908a18c463bf7d2da3c39ea6141cab68fd7eac30.zip
* src/dispnew.c (neutralize_wide_char): Don't use used[0]
-rw-r--r--src/dispnew.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index a7adbfb6f16..b8bc9f73afa 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -3547,20 +3547,19 @@ neutralize_wide_char (struct frame *root, struct glyph_row *row, int x)
3547 if (x < 0 || x >= root->desired_matrix->matrix_w) 3547 if (x < 0 || x >= root->desired_matrix->matrix_w)
3548 return; 3548 return;
3549 3549
3550 struct glyph *glyph = row->glyphs[0] + x; 3550 struct glyph *glyph = row->glyphs[TEXT_AREA] + x;
3551 if (glyph->type == CHAR_GLYPH && CHARACTER_WIDTH (glyph->u.ch) > 1) 3551 if (glyph->type == CHAR_GLYPH && CHARACTER_WIDTH (glyph->u.ch) > 1)
3552 { 3552 {
3553 struct glyph *row_start = row->glyphs[0];
3554 struct glyph *row_limit = row_start + row->used[0];
3555
3556 /* Glyph is somewhere in a sequence of glyphs for a wide 3553 /* Glyph is somewhere in a sequence of glyphs for a wide
3557 character, find the start. */ 3554 character, find the start. */
3555 struct glyph *row_start = row->glyphs[TEXT_AREA];
3558 while (glyph > row_start && glyph->padding_p) 3556 while (glyph > row_start && glyph->padding_p)
3559 --glyph; 3557 --glyph;
3560 3558
3561 /* Make everything in the sequence a space glyph. */ 3559 /* Make everything in the sequence a space glyph. */
3562 eassert (!glyph->padding_p); 3560 eassert (!glyph->padding_p);
3563 make_glyph_space (glyph); 3561 make_glyph_space (glyph);
3562 struct glyph *row_limit = row_start + row->used[TEXT_AREA];
3564 for (++glyph; glyph < row_limit && glyph->padding_p; ++glyph) 3563 for (++glyph; glyph < row_limit && glyph->padding_p; ++glyph)
3565 make_glyph_space (glyph); 3564 make_glyph_space (glyph);
3566 } 3565 }