diff options
| author | Gerd Möllmann | 2024-11-10 16:18:29 +0100 |
|---|---|---|
| committer | Gerd Möllmann | 2024-11-10 19:50:08 +0100 |
| commit | 582ebedd33ed957b9ad409e35ed7ba9dafa42c01 (patch) | |
| tree | 1063891dc9c5879d8fe54ce65cfe0b6cbe68dba7 /src | |
| parent | aa8bebf9b3eff9e53eeb1dc1a91fcc9ee5ee1095 (diff) | |
| download | emacs-582ebedd33ed957b9ad409e35ed7ba9dafa42c01.tar.gz emacs-582ebedd33ed957b9ad409e35ed7ba9dafa42c01.zip | |
Another case of copying from non-enabled glyphs (bug#74274)
* src/dispnew.c (build_frame_matrix_from_leaf_window): If current window
row is not enabled, don't copy from it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispnew.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index 1b8b726b7f3..4758aabe967 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -2636,10 +2636,21 @@ build_frame_matrix_from_leaf_window (struct glyph_matrix *frame_matrix, struct w | |||
| 2636 | 2636 | ||
| 2637 | if (current_row_p) | 2637 | if (current_row_p) |
| 2638 | { | 2638 | { |
| 2639 | /* Copy window row to frame row. */ | 2639 | /* If the desired glyphs for this row haven't been built, |
| 2640 | memcpy (frame_row->glyphs[TEXT_AREA] + window_matrix->matrix_x, | 2640 | copy from the corresponding current row, but only if it |
| 2641 | window_row->glyphs[0], | 2641 | is enabled, because ottherwise its contents are invalid. */ |
| 2642 | window_matrix->matrix_w * sizeof (struct glyph)); | 2642 | struct glyph *to = frame_row->glyphs[TEXT_AREA] + window_matrix->matrix_x; |
| 2643 | struct glyph *from = window_row->glyphs[0]; | ||
| 2644 | for (int i = 0; i < window_matrix->matrix_w; ++i) | ||
| 2645 | { | ||
| 2646 | if (window_row->enabled_p) | ||
| 2647 | to[i] = from[i]; | ||
| 2648 | else | ||
| 2649 | { | ||
| 2650 | to[i] = space_glyph; | ||
| 2651 | to[i].frame = f; | ||
| 2652 | } | ||
| 2653 | } | ||
| 2643 | } | 2654 | } |
| 2644 | else | 2655 | else |
| 2645 | { | 2656 | { |