aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Möllmann2025-01-21 20:40:19 +0100
committerGerd Möllmann2025-01-21 20:43:17 +0100
commitd30f40868bf260692c7702e43b439d592b830e16 (patch)
treebe950318a2f31482dedf33f59de6ccb939d96b85 /src
parent1f02677500211a163dd22b1263edec0d7be0fd16 (diff)
downloademacs-d30f40868bf260692c7702e43b439d592b830e16.tar.gz
emacs-d30f40868bf260692c7702e43b439d592b830e16.zip
Improve copying current glyphs when building frame matrix
* src/dispnew.c (build_frame_matrix_from_leaf_window): Don't make space glyphs. More comments.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 302f7db8815..23ef5ff699b 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -2627,22 +2627,27 @@ build_frame_matrix_from_leaf_window (struct glyph_matrix *frame_matrix, struct w
2627 current_row_p = 1; 2627 current_row_p = 1;
2628 } 2628 }
2629 2629
2630 /* If someone asks why we are copying current glyphs here, and
2631 maybe never enable the desired frame row we copy to:
2632
2633 - there might be a window to the right of this one that has a
2634 corresponding desired window row.
2635 - we need the complete frame row for scrolling. */
2630 if (current_row_p) 2636 if (current_row_p)
2631 { 2637 {
2632 /* If the desired glyphs for this row haven't been built, 2638 /* If the desired glyphs for this row haven't been built, copy
2633 copy from the corresponding current row, but only if it 2639 from the corresponding current row. If that row is not
2634 is enabled, because ottherwise its contents are invalid. */ 2640 enabled, its contents might be invalid. Make sure that
2641 glyphs have valid frames set in that case. This is closer
2642 to what we did before child frames were added, and seems to
2643 be something tty redisplay implicitly relies on. */
2635 struct glyph *to = frame_row->glyphs[TEXT_AREA] + window_matrix->matrix_x; 2644 struct glyph *to = frame_row->glyphs[TEXT_AREA] + window_matrix->matrix_x;
2636 struct glyph *from = window_row->glyphs[0]; 2645 struct glyph *from = window_row->glyphs[0];
2637 for (int i = 0; i < window_matrix->matrix_w; ++i) 2646 for (int i = 0; i < window_matrix->matrix_w; ++i)
2638 { 2647 {
2639 if (window_row->enabled_p) 2648 to[i] = from[i];
2640 to[i] = from[i]; 2649 if (!window_row->enabled_p)
2641 else 2650 to[i].frame = f;
2642 {
2643 to[i] = space_glyph;
2644 to[i].frame = f;
2645 }
2646 } 2651 }
2647 } 2652 }
2648 else 2653 else