comparison src/xdisp.c @ 27990:723662ab7db4

(try_window_id): Recompute unchanged information if it is invalid.
author Gerd Moellmann <gerd@gnu.org>
date Sun, 05 Mar 2000 10:21:53 +0000
parents a6384a2b5574
children 694ac11a3e1c
comparison
equal deleted inserted replaced
27989:3371488e8406 27990:723662ab7db4
10032 10032
10033 /* Make sure beg_unchanged and end_unchanged are up to date. Do it 10033 /* Make sure beg_unchanged and end_unchanged are up to date. Do it
10034 only if buffer has really changed. The reason is that the gap is 10034 only if buffer has really changed. The reason is that the gap is
10035 initially at Z for freshly visited files. The code below would 10035 initially at Z for freshly visited files. The code below would
10036 set end_unchanged to 0 in that case. */ 10036 set end_unchanged to 0 in that case. */
10037 if (MODIFF > SAVE_MODIFF) 10037 if (MODIFF > SAVE_MODIFF
10038 /* This seems to happen sometimes after saving a buffer. */
10039 || BEG_UNCHANGED + END_UNCHANGED > Z_BYTE)
10038 { 10040 {
10039 if (GPT - BEG < BEG_UNCHANGED) 10041 if (GPT - BEG < BEG_UNCHANGED)
10040 BEG_UNCHANGED = GPT - BEG; 10042 BEG_UNCHANGED = GPT - BEG;
10041 if (Z - GPT < END_UNCHANGED) 10043 if (Z - GPT < END_UNCHANGED)
10042 END_UNCHANGED = Z - GPT; 10044 END_UNCHANGED = Z - GPT;
10043 } 10045 }
10044 10046
10045 /* Some strange bug seems to be causing that to happen sometimes. */
10046 if (BEG_UNCHANGED + END_UNCHANGED > Z_BYTE)
10047 abort ();
10048
10049 /* If window starts after a line end, and the last change is in 10047 /* If window starts after a line end, and the last change is in
10050 front of that newline, then changes don't affect the display. 10048 front of that newline, then changes don't affect the display.
10051 This case happens with stealth-fontification. */ 10049 This case happens with stealth-fontification. */
10052 row = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); 10050 row = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
10053 if (CHARPOS (start) > BEGV 10051 if (CHARPOS (start) > BEGV