# HG changeset patch # User Gerd Moellmann # Date 993467611 0 # Node ID 22571591f506990857ce685ecf6092716ad5e31c # Parent ce5574d763e143609ff16873a3a9e83b924eaea4 (try_window_id) : 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. diff -r ce5574d763e1 -r 22571591f506 src/xdisp.c --- a/src/xdisp.c Mon Jun 25 10:39:06 2001 +0000 +++ b/src/xdisp.c Mon Jun 25 11:13:31 2001 +0000 @@ -11226,14 +11226,12 @@ } /* Handle the case that changes are all below what is displayed in - the window, and that PT is in the window. - RMS: This used to use >=, but that was spuriously true - when inserting at the end of buffer when the end of buffer - was visible on the screen. I think it is safe now, - because the test now insists there is a character between the end of - the last screen row used and the first change, and that character - must not off the bottom of the screen. */ - if (first_changed_charpos > MATRIX_ROW_END_CHARPOS (row)) + the window, and that PT is in the window. This short cut cannot + be taken if ZV is visible in the window, and text has been added + there that is visible in the window. */ + if (first_changed_charpos >= MATRIX_ROW_END_CHARPOS (row) + /* ZV is not visible in the window. */ + && current_matrix->zv > MATRIX_ROW_END_CHARPOS (row)) { struct glyph_row *r0; @@ -11263,12 +11261,14 @@ } } - /* Give up if window start is in the changed area - if the total size has changed. */ - /* RMS: Is it really relevant whether the total size has changed? - Why should that matter? */ - if (BEG_UNCHANGED + END_UNCHANGED != Z - BEG - && CHARPOS (start) >= first_changed_charpos + /* Give up if window start is in the changed area. + + The condition used to read + + (BEG_UNCHANGED + END_UNCHANGED != Z - BEG && ...) + + but why that was tested escapes me at the moment. */ + if (CHARPOS (start) >= first_changed_charpos && CHARPOS (start) <= last_changed_charpos) GIVE_UP (15);