[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/tty-child-frames 37cdf2897ad: Fix a FIXME In redisplay_internal
From: |
Gerd Moellmann |
Subject: |
scratch/tty-child-frames 37cdf2897ad: Fix a FIXME In redisplay_internal |
Date: |
Tue, 12 Nov 2024 08:02:57 -0500 (EST) |
branch: scratch/tty-child-frames
commit 37cdf2897ad51f45a228c86f5f12feeb284673df
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>
Fix a FIXME In redisplay_internal
* src/xdisp.c (redisplay_internal): Compare root frames before
setting the frame garbaged.
---
src/xdisp.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index bd3e8f3138d..f9764f82e03 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -17035,19 +17035,22 @@ redisplay_internal (void)
if (face_change)
windows_or_buffers_changed = 47;
- /* FIXME: Can we do better for tty child frames? It could be
- a bit faster when we switch between child frames of the same
- root frame. OTOH, it's probably not a frequent use case. */
+ struct frame *previous_frame;
if ((FRAME_TERMCAP_P (sf) || FRAME_MSDOS_P (sf))
- && FRAME_TTY (sf)->previous_frame != sf)
+ && (previous_frame = FRAME_TTY (sf)->previous_frame,
+ previous_frame != sf))
{
- /* Since frames on a single ASCII terminal share the same
- display area, displaying a different frame means redisplay
- the whole thing. */
- SET_FRAME_GARBAGED (sf);
+ if (previous_frame == NULL
+ || root_frame (previous_frame) != root_frame (sf))
+ {
+ /* Since frames on a single terminal share the same display
+ area, displaying a different frame means redisplay the
+ whole thing. */
+ SET_FRAME_GARBAGED (sf);
#if !defined DOS_NT && !defined HAVE_ANDROID
- set_tty_color_mode (FRAME_TTY (sf), sf);
+ set_tty_color_mode (FRAME_TTY (sf), sf);
#endif
+ }
FRAME_TTY (sf)->previous_frame = sf;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- scratch/tty-child-frames 37cdf2897ad: Fix a FIXME In redisplay_internal,
Gerd Moellmann <=