aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/xdisp.c33
1 files changed, 27 insertions, 6 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index ba8ba1b72e3..0497490928f 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -17214,7 +17214,11 @@ redisplay_internal (void)
17214 /* All text outside that line, including its final newline, 17214 /* All text outside that line, including its final newline,
17215 must be unchanged. */ 17215 must be unchanged. */
17216 && text_outside_line_unchanged_p (w, CHARPOS (tlbufpos), 17216 && text_outside_line_unchanged_p (w, CHARPOS (tlbufpos),
17217 CHARPOS (tlendpos))) 17217 CHARPOS (tlendpos))
17218 /* If this is a window on a tty root frame displaying a child frame,
17219 the current matrix of W may contain glyphs of that child frame.
17220 Don't try shortcuts that might use the current matrix in this case. */
17221 && !is_tty_root_frame_with_visible_child (XFRAME (w->frame)))
17218 { 17222 {
17219 if (CHARPOS (tlbufpos) > BEGV 17223 if (CHARPOS (tlbufpos) > BEGV
17220 && FETCH_BYTE (BYTEPOS (tlbufpos) - 1) != '\n' 17224 && FETCH_BYTE (BYTEPOS (tlbufpos) - 1) != '\n'
@@ -17279,11 +17283,7 @@ redisplay_internal (void)
17279 line and this line is the current one, because 17283 line and this line is the current one, because
17280 display_line above is not informed about the 17284 display_line above is not informed about the
17281 current-line's vpos, and cannot DTRT in that case. */ 17285 current-line's vpos, and cannot DTRT in that case. */
17282 && !hscrolling_current_line_p (w) 17286 && !hscrolling_current_line_p (w))
17283 /* A root frame may have visible children displayed in its
17284 current matrix, so that we can't do the below with its
17285 current matrix. */
17286 && !is_tty_root_frame_with_visible_child (it.f))
17287 { 17287 {
17288 /* If this is not the window's last line, we must adjust 17288 /* If this is not the window's last line, we must adjust
17289 the charstarts of the lines below. */ 17289 the charstarts of the lines below. */
@@ -19430,6 +19430,13 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp,
19430 struct frame *f = XFRAME (w->frame); 19430 struct frame *f = XFRAME (w->frame);
19431 int rc = CURSOR_MOVEMENT_CANNOT_BE_USED; 19431 int rc = CURSOR_MOVEMENT_CANNOT_BE_USED;
19432 19432
19433
19434 /* If this is a window on a tty root frame displaying a child frame,
19435 the current matrix of W may contain glyphs of that child frame,
19436 so this method is not safe to use. */
19437 if (is_tty_root_frame_with_visible_child (f))
19438 return rc;
19439
19433#ifdef GLYPH_DEBUG 19440#ifdef GLYPH_DEBUG
19434 if (inhibit_try_cursor_movement) 19441 if (inhibit_try_cursor_movement)
19435 return rc; 19442 return rc;
@@ -21333,6 +21340,13 @@ static bool
21333try_window_reusing_current_matrix (struct window *w) 21340try_window_reusing_current_matrix (struct window *w)
21334{ 21341{
21335 struct frame *f = XFRAME (w->frame); 21342 struct frame *f = XFRAME (w->frame);
21343
21344 /* If this is a window on a tty root frame displaying a child frame,
21345 the current matrix of W may contain glyphs of that child frame,
21346 so this method is not safe to use. */
21347 if (is_tty_root_frame_with_visible_child (f))
21348 return false;
21349
21336 struct glyph_row *bottom_row; 21350 struct glyph_row *bottom_row;
21337 struct it it; 21351 struct it it;
21338 struct run run; 21352 struct run run;
@@ -22120,6 +22134,13 @@ static int
22120try_window_id (struct window *w) 22134try_window_id (struct window *w)
22121{ 22135{
22122 struct frame *f = XFRAME (w->frame); 22136 struct frame *f = XFRAME (w->frame);
22137
22138 /* If this is a window on a tty root frame displaying a child frame,
22139 the current matrix of W may contain glyphs of that child frame,
22140 so this method is not safe to use. */
22141 if (is_tty_root_frame_with_visible_child (f))
22142 return 0;
22143
22123 struct glyph_matrix *current_matrix = w->current_matrix; 22144 struct glyph_matrix *current_matrix = w->current_matrix;
22124 struct glyph_matrix *desired_matrix = w->desired_matrix; 22145 struct glyph_matrix *desired_matrix = w->desired_matrix;
22125 struct glyph_row *last_unchanged_at_beg_row; 22146 struct glyph_row *last_unchanged_at_beg_row;