Mercurial > emacs
comparison src/xdisp.c @ 38180:22571591f506
(try_window_id) <all changes below window end>: Don't
take this shortcut if ZV is visible in the window.
(try_window_id): When checking for window start being in changed
text, don't check that the buffer's size has changed.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 25 Jun 2001 11:13:31 +0000 |
parents | ae548ba56493 |
children | dcc5dde7a1a0 |
comparison
equal
deleted
inserted
replaced
38179:ce5574d763e1 | 38180:22571591f506 |
---|---|
11224 return 1; | 11224 return 1; |
11225 } | 11225 } |
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. This short cut cannot |
11230 RMS: This used to use >=, but that was spuriously true | 11230 be taken if ZV is visible in the window, and text has been added |
11231 when inserting at the end of buffer when the end of buffer | 11231 there that is visible in the window. */ |
11232 was visible on the screen. I think it is safe now, | 11232 if (first_changed_charpos >= MATRIX_ROW_END_CHARPOS (row) |
11233 because the test now insists there is a character between the end of | 11233 /* ZV is not visible in the window. */ |
11234 the last screen row used and the first change, and that character | 11234 && current_matrix->zv > MATRIX_ROW_END_CHARPOS (row)) |
11235 must not off the bottom of the screen. */ | |
11236 if (first_changed_charpos > MATRIX_ROW_END_CHARPOS (row)) | |
11237 { | 11235 { |
11238 struct glyph_row *r0; | 11236 struct glyph_row *r0; |
11239 | 11237 |
11240 /* Give up if PT is not in the window. Note that it already has | 11238 /* Give up if PT is not in the window. Note that it already has |
11241 been checked at the start of try_window_id that PT is not in | 11239 been checked at the start of try_window_id that PT is not in |
11261 set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0); | 11259 set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0); |
11262 return 2; | 11260 return 2; |
11263 } | 11261 } |
11264 } | 11262 } |
11265 | 11263 |
11266 /* Give up if window start is in the changed area | 11264 /* Give up if window start is in the changed area. |
11267 if the total size has changed. */ | 11265 |
11268 /* RMS: Is it really relevant whether the total size has changed? | 11266 The condition used to read |
11269 Why should that matter? */ | 11267 |
11270 if (BEG_UNCHANGED + END_UNCHANGED != Z - BEG | 11268 (BEG_UNCHANGED + END_UNCHANGED != Z - BEG && ...) |
11271 && CHARPOS (start) >= first_changed_charpos | 11269 |
11270 but why that was tested escapes me at the moment. */ | |
11271 if (CHARPOS (start) >= first_changed_charpos | |
11272 && CHARPOS (start) <= last_changed_charpos) | 11272 && CHARPOS (start) <= last_changed_charpos) |
11273 GIVE_UP (15); | 11273 GIVE_UP (15); |
11274 | 11274 |
11275 /* Check that window start agrees with the start of the first glyph | 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 | 11276 row in its current matrix. Check this after we know the window |