]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't copy from non-enabled current glyphs (bug#74274)
authorGerd Möllmann <gerd@gnu.org>
Sat, 9 Nov 2024 07:26:06 +0000 (08:26 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Dec 2024 14:54:20 +0000 (15:54 +0100)
* src/dispnew.c (prepare_desired_root_row): Check if current row is
enabled.

(cherry picked from commit 8fa26765c0dcedcadf884195189e337cb9778cb8)

src/dispnew.c

index b202d66761165b12661874d39b98c809f0b7770c..15fbf983b4b43b1e12e9179eae7367ff1de37e1a 100644 (file)
@@ -3517,9 +3517,12 @@ prepare_desired_root_row (struct frame *root, int y)
   if (!root_row->enabled_p)
     {
       struct glyph_row *from = MATRIX_ROW (root->current_matrix, y);
-      memcpy (root_row->glyphs[0], from->glyphs[0],
-             root->current_matrix->matrix_w * sizeof (struct glyph));
-      root_row->enabled_p = true;
+      if (from->enabled_p)
+       {
+         memcpy (root_row->glyphs[0], from->glyphs[0],
+                 root->current_matrix->matrix_w * sizeof (struct glyph));
+         root_row->enabled_p = true;
+       }
     }
   return root_row;
 }