aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index f18f5ac5a2f..1133197878e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -11106,7 +11106,7 @@ try_window_id (w)
11106 if (windows_or_buffers_changed) 11106 if (windows_or_buffers_changed)
11107 GIVE_UP (2); 11107 GIVE_UP (2);
11108 11108
11109 /* Narrowing has not changed. This flag is also set to prevent 11109 /* Verify that narrowing has not changed. This flag is also set to prevent
11110 redisplay optimizations. It would be nice to further 11110 redisplay optimizations. It would be nice to further
11111 reduce the number of cases where this prevents try_window_id. */ 11111 reduce the number of cases where this prevents try_window_id. */
11112 if (current_buffer->clip_changed) 11112 if (current_buffer->clip_changed)
@@ -11118,7 +11118,7 @@ try_window_id (w)
11118 || !WINDOW_FULL_WIDTH_P (w))) 11118 || !WINDOW_FULL_WIDTH_P (w)))
11119 GIVE_UP (4); 11119 GIVE_UP (4);
11120 11120
11121 /* Point is not known NOT to appear in W. */ 11121 /* Give up if point is not known NOT to appear in W. */
11122 if (PT < CHARPOS (start)) 11122 if (PT < CHARPOS (start))
11123 GIVE_UP (5); 11123 GIVE_UP (5);
11124 11124
@@ -11126,11 +11126,11 @@ try_window_id (w)
11126 if (XFASTINT (w->last_modified) == 0) 11126 if (XFASTINT (w->last_modified) == 0)
11127 GIVE_UP (6); 11127 GIVE_UP (6);
11128 11128
11129 /* Window is not hscrolled. */ 11129 /* Verify that window is not hscrolled. */
11130 if (XFASTINT (w->hscroll) != 0) 11130 if (XFASTINT (w->hscroll) != 0)
11131 GIVE_UP (7); 11131 GIVE_UP (7);
11132 11132
11133 /* Display wasn't paused. */ 11133 /* Verify that display wasn't paused. */
11134 if (NILP (w->window_end_valid)) 11134 if (NILP (w->window_end_valid))
11135 GIVE_UP (8); 11135 GIVE_UP (8);
11136 11136
@@ -11226,8 +11226,14 @@ try_window_id (w)
11226 } 11226 }
11227 11227
11228 /* Handle the case that changes are all below what is displayed in 11228 /* Handle the case that changes are all below what is displayed in
11229 the window, and that PT is in the window. */ 11229 the window, and that PT is in the window.
11230 if (first_changed_charpos >= MATRIX_ROW_END_CHARPOS (row)) 11230 RMS: This used to use >=, but that was spuriously true
11231 when inserting at the end of buffer when the end of buffer
11232 was visible on the screen. I think it is safe now,
11233 because the test now insists there is a character between the end of
11234 the last screen row used and the first change, and that character
11235 must not off the bottom of the screen. */
11236 if (first_changed_charpos > MATRIX_ROW_END_CHARPOS (row))
11231 { 11237 {
11232 struct glyph_row *r0; 11238 struct glyph_row *r0;
11233 11239
@@ -11257,15 +11263,19 @@ try_window_id (w)
11257 } 11263 }
11258 } 11264 }
11259 11265
11260 /* Check that window start agrees with the start of the first glyph 11266 /* Give up if window start is in the changed area
11261 row in its current matrix. Check this after we know the window 11267 if the total size has changed. */
11262 start is not in changed text, otherwise positions would not be 11268 /* RMS: Is it really relevant whether the total size has changed?
11263 comparable. */ 11269 Why should that matter? */
11264 if (BEG_UNCHANGED + END_UNCHANGED != Z - BEG 11270 if (BEG_UNCHANGED + END_UNCHANGED != Z - BEG
11265 && CHARPOS (start) >= first_changed_charpos 11271 && CHARPOS (start) >= first_changed_charpos
11266 && CHARPOS (start) <= last_changed_charpos) 11272 && CHARPOS (start) <= last_changed_charpos)
11267 GIVE_UP (15); 11273 GIVE_UP (15);
11268 11274
11275 /* Check that window start agrees with the start of the first glyph
11276 row in its current matrix. Check this after we know the window
11277 start is not in changed text, otherwise positions would not be
11278 comparable. */
11269 row = MATRIX_FIRST_TEXT_ROW (current_matrix); 11279 row = MATRIX_FIRST_TEXT_ROW (current_matrix);
11270 if (!TEXT_POS_EQUAL_P (start, row->start.pos)) 11280 if (!TEXT_POS_EQUAL_P (start, row->start.pos))
11271 GIVE_UP (16); 11281 GIVE_UP (16);