]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/dispnew.c (neutralize_wide_char): Don't use used[0]
authorGerd Möllmann <gerd@gnu.org>
Tue, 5 Nov 2024 19:10:38 +0000 (20:10 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Dec 2024 14:54:04 +0000 (15:54 +0100)
(cherry picked from commit 908a18c463bf7d2da3c39ea6141cab68fd7eac30)

src/dispnew.c

index 8de450b22f826457c4221d8d6ef64c2e946f217e..b202d66761165b12661874d39b98c809f0b7770c 100644 (file)
@@ -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);
     }