[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d30f40868bf: Improve copying current glyphs when building frame m
From: |
Gerd Moellmann |
Subject: |
master d30f40868bf: Improve copying current glyphs when building frame matrix |
Date: |
Tue, 21 Jan 2025 14:43:29 -0500 (EST) |
branch: master
commit d30f40868bf260692c7702e43b439d592b830e16
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>
Improve copying current glyphs when building frame matrix
* src/dispnew.c (build_frame_matrix_from_leaf_window): Don't make space
glyphs. More comments.
---
src/dispnew.c | 25 +++++++++++++++----------
1 file 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
current_row_p = 1;
}
+ /* If someone asks why we are copying current glyphs here, and
+ maybe never enable the desired frame row we copy to:
+
+ - there might be a window to the right of this one that has a
+ corresponding desired window row.
+ - we need the complete frame row for scrolling. */
if (current_row_p)
{
- /* If the desired glyphs for this row haven't been built,
- copy from the corresponding current row, but only if it
- is enabled, because ottherwise its contents are invalid. */
+ /* If the desired glyphs for this row haven't been built, copy
+ from the corresponding current row. If that row is not
+ enabled, its contents might be invalid. Make sure that
+ glyphs have valid frames set in that case. This is closer
+ to what we did before child frames were added, and seems to
+ be something tty redisplay implicitly relies on. */
struct glyph *to = frame_row->glyphs[TEXT_AREA] +
window_matrix->matrix_x;
struct glyph *from = window_row->glyphs[0];
for (int i = 0; i < window_matrix->matrix_w; ++i)
{
- if (window_row->enabled_p)
- to[i] = from[i];
- else
- {
- to[i] = space_glyph;
- to[i].frame = f;
- }
+ to[i] = from[i];
+ if (!window_row->enabled_p)
+ to[i].frame = f;
}
}
else
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master d30f40868bf: Improve copying current glyphs when building frame matrix,
Gerd Moellmann <=