diff options
| author | Richard M. Stallman | 2002-07-16 13:47:07 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-07-16 13:47:07 +0000 |
| commit | c62c1bb5cbf09da4f727233f178073f398b5b435 (patch) | |
| tree | c380ca0f71998c306b0483e760becf452464dfe8 /src | |
| parent | 160552c5274a64f865629329940ea1ea7811257a (diff) | |
| download | emacs-c62c1bb5cbf09da4f727233f178073f398b5b435.tar.gz emacs-c62c1bb5cbf09da4f727233f178073f398b5b435.zip | |
(reconsider_clip_changes): Don't test prevent_redisplay_optimizations_p.
(redisplay_internal): Test prevent_redisplay_optimizations_p
along with clip_changed in some cases.
(try_window_id): Likewise.
(redisplay_window): New local var buffer_unchanged_p.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 896740367f8..6afed354b07 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -8420,9 +8420,7 @@ reconsider_clip_changes (w, b) | |||
| 8420 | struct window *w; | 8420 | struct window *w; |
| 8421 | struct buffer *b; | 8421 | struct buffer *b; |
| 8422 | { | 8422 | { |
| 8423 | if (b->prevent_redisplay_optimizations_p) | 8423 | if (b->clip_changed |
| 8424 | b->clip_changed = 1; | ||
| 8425 | else if (b->clip_changed | ||
| 8426 | && !NILP (w->window_end_valid) | 8424 | && !NILP (w->window_end_valid) |
| 8427 | && w->current_matrix->buffer == b | 8425 | && w->current_matrix->buffer == b |
| 8428 | && w->current_matrix->zv == BUF_ZV (b) | 8426 | && w->current_matrix->zv == BUF_ZV (b) |
| @@ -8689,6 +8687,7 @@ redisplay_internal (preserve_echo_area) | |||
| 8689 | && CHARPOS (tlbufpos) > 0 | 8687 | && CHARPOS (tlbufpos) > 0 |
| 8690 | && NILP (w->update_mode_line) | 8688 | && NILP (w->update_mode_line) |
| 8691 | && !current_buffer->clip_changed | 8689 | && !current_buffer->clip_changed |
| 8690 | && !current_buffer->prevent_redisplay_optimizations_p | ||
| 8692 | && FRAME_VISIBLE_P (XFRAME (w->frame)) | 8691 | && FRAME_VISIBLE_P (XFRAME (w->frame)) |
| 8693 | && !FRAME_OBSCURED_P (XFRAME (w->frame)) | 8692 | && !FRAME_OBSCURED_P (XFRAME (w->frame)) |
| 8694 | /* Make sure recorded data applies to current buffer, etc. */ | 8693 | /* Make sure recorded data applies to current buffer, etc. */ |
| @@ -10093,6 +10092,9 @@ redisplay_window (window, just_this_one_p) | |||
| 10093 | struct it it; | 10092 | struct it it; |
| 10094 | /* Record it now because it's overwritten. */ | 10093 | /* Record it now because it's overwritten. */ |
| 10095 | int current_matrix_up_to_date_p = 0; | 10094 | int current_matrix_up_to_date_p = 0; |
| 10095 | /* This is less strict than current_matrix_up_to_date_p. | ||
| 10096 | It indictes that the buffer contents and narrowing are unchanged. */ | ||
| 10097 | int buffer_unchanged_p = 0; | ||
| 10096 | int temp_scroll_step = 0; | 10098 | int temp_scroll_step = 0; |
| 10097 | int count = SPECPDL_INDEX (); | 10099 | int count = SPECPDL_INDEX (); |
| 10098 | int rc; | 10100 | int rc; |
| @@ -10114,7 +10116,8 @@ redisplay_window (window, just_this_one_p) | |||
| 10114 | /* Has the mode line to be updated? */ | 10116 | /* Has the mode line to be updated? */ |
| 10115 | update_mode_line = (!NILP (w->update_mode_line) | 10117 | update_mode_line = (!NILP (w->update_mode_line) |
| 10116 | || update_mode_lines | 10118 | || update_mode_lines |
| 10117 | || buffer->clip_changed); | 10119 | || buffer->clip_changed |
| 10120 | || buffer->prevent_redisplay_optimizations_p); | ||
| 10118 | 10121 | ||
| 10119 | if (MINI_WINDOW_P (w)) | 10122 | if (MINI_WINDOW_P (w)) |
| 10120 | { | 10123 | { |
| @@ -10157,9 +10160,16 @@ redisplay_window (window, just_this_one_p) | |||
| 10157 | current_matrix_up_to_date_p | 10160 | current_matrix_up_to_date_p |
| 10158 | = (!NILP (w->window_end_valid) | 10161 | = (!NILP (w->window_end_valid) |
| 10159 | && !current_buffer->clip_changed | 10162 | && !current_buffer->clip_changed |
| 10163 | && !current_buffer->prevent_redisplay_optimizations_p | ||
| 10160 | && XFASTINT (w->last_modified) >= MODIFF | 10164 | && XFASTINT (w->last_modified) >= MODIFF |
| 10161 | && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF); | 10165 | && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF); |
| 10162 | 10166 | ||
| 10167 | buffer_unchanged_p | ||
| 10168 | = (!NILP (w->window_end_valid) | ||
| 10169 | && !current_buffer->clip_changed | ||
| 10170 | && END_UNCHANGED + BEG_UNCHANGED >= Z - BEG | ||
| 10171 | && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF); | ||
| 10172 | |||
| 10163 | /* When windows_or_buffers_changed is non-zero, we can't rely on | 10173 | /* When windows_or_buffers_changed is non-zero, we can't rely on |
| 10164 | the window end being valid, so set it to nil there. */ | 10174 | the window end being valid, so set it to nil there. */ |
| 10165 | if (windows_or_buffers_changed) | 10175 | if (windows_or_buffers_changed) |
| @@ -10277,8 +10287,7 @@ redisplay_window (window, just_this_one_p) | |||
| 10277 | w->window_end_valid = Qnil; | 10287 | w->window_end_valid = Qnil; |
| 10278 | 10288 | ||
| 10279 | /* Forget any recorded base line for line number display. */ | 10289 | /* Forget any recorded base line for line number display. */ |
| 10280 | if (!current_matrix_up_to_date_p | 10290 | if (!buffer_unchanged_p) |
| 10281 | || current_buffer->clip_changed) | ||
| 10282 | w->base_line_number = Qnil; | 10291 | w->base_line_number = Qnil; |
| 10283 | 10292 | ||
| 10284 | /* Redisplay the mode line. Select the buffer properly for that. | 10293 | /* Redisplay the mode line. Select the buffer properly for that. |
| @@ -10356,7 +10365,7 @@ redisplay_window (window, just_this_one_p) | |||
| 10356 | 10365 | ||
| 10357 | /* Handle case where text has not changed, only point, and it has | 10366 | /* Handle case where text has not changed, only point, and it has |
| 10358 | not moved off the frame. */ | 10367 | not moved off the frame. */ |
| 10359 | if (current_matrix_up_to_date_p | 10368 | if (buffer_unchanged_p |
| 10360 | && (rc = try_cursor_movement (window, startp, &temp_scroll_step), | 10369 | && (rc = try_cursor_movement (window, startp, &temp_scroll_step), |
| 10361 | rc != CURSOR_MOVEMENT_CANNOT_BE_USED)) | 10370 | rc != CURSOR_MOVEMENT_CANNOT_BE_USED)) |
| 10362 | { | 10371 | { |
| @@ -10510,8 +10519,7 @@ redisplay_window (window, just_this_one_p) | |||
| 10510 | /* w->vscroll = 0; */ | 10519 | /* w->vscroll = 0; */ |
| 10511 | 10520 | ||
| 10512 | /* Forget any previously recorded base line for line number display. */ | 10521 | /* Forget any previously recorded base line for line number display. */ |
| 10513 | if (!current_matrix_up_to_date_p | 10522 | if (!buffer_unchanged_p) |
| 10514 | || current_buffer->clip_changed) | ||
| 10515 | w->base_line_number = Qnil; | 10523 | w->base_line_number = Qnil; |
| 10516 | 10524 | ||
| 10517 | /* Move backward half the height of the window. */ | 10525 | /* Move backward half the height of the window. */ |
| @@ -11525,10 +11533,12 @@ try_window_id (w) | |||
| 11525 | if (windows_or_buffers_changed || cursor_type_changed) | 11533 | if (windows_or_buffers_changed || cursor_type_changed) |
| 11526 | GIVE_UP (2); | 11534 | GIVE_UP (2); |
| 11527 | 11535 | ||
| 11528 | /* Verify that narrowing has not changed. This flag is also set to prevent | 11536 | /* Verify that narrowing has not changed. |
| 11529 | redisplay optimizations. It would be nice to further | 11537 | Also verify that we were not told to prevent redisplay optimizations. |
| 11538 | It would be nice to further | ||
| 11530 | reduce the number of cases where this prevents try_window_id. */ | 11539 | reduce the number of cases where this prevents try_window_id. */ |
| 11531 | if (current_buffer->clip_changed) | 11540 | if (current_buffer->clip_changed |
| 11541 | || current_buffer->prevent_redisplay_optimizations_p) | ||
| 11532 | GIVE_UP (3); | 11542 | GIVE_UP (3); |
| 11533 | 11543 | ||
| 11534 | /* Window must either use window-based redisplay or be full width. */ | 11544 | /* Window must either use window-based redisplay or be full width. */ |