Mercurial > emacs
changeset 46413:da9e42d793d2
(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.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 16 Jul 2002 13:47:07 +0000 |
parents | 7284594e6125 |
children | a61f957ee22f |
files | src/xdisp.c |
diffstat | 1 files changed, 22 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xdisp.c Tue Jul 16 13:42:15 2002 +0000 +++ b/src/xdisp.c Tue Jul 16 13:47:07 2002 +0000 @@ -8420,9 +8420,7 @@ struct window *w; struct buffer *b; { - if (b->prevent_redisplay_optimizations_p) - b->clip_changed = 1; - else if (b->clip_changed + if (b->clip_changed && !NILP (w->window_end_valid) && w->current_matrix->buffer == b && w->current_matrix->zv == BUF_ZV (b) @@ -8689,6 +8687,7 @@ && CHARPOS (tlbufpos) > 0 && NILP (w->update_mode_line) && !current_buffer->clip_changed + && !current_buffer->prevent_redisplay_optimizations_p && FRAME_VISIBLE_P (XFRAME (w->frame)) && !FRAME_OBSCURED_P (XFRAME (w->frame)) /* Make sure recorded data applies to current buffer, etc. */ @@ -10093,6 +10092,9 @@ struct it it; /* Record it now because it's overwritten. */ int current_matrix_up_to_date_p = 0; + /* This is less strict than current_matrix_up_to_date_p. + It indictes that the buffer contents and narrowing are unchanged. */ + int buffer_unchanged_p = 0; int temp_scroll_step = 0; int count = SPECPDL_INDEX (); int rc; @@ -10114,7 +10116,8 @@ /* Has the mode line to be updated? */ update_mode_line = (!NILP (w->update_mode_line) || update_mode_lines - || buffer->clip_changed); + || buffer->clip_changed + || buffer->prevent_redisplay_optimizations_p); if (MINI_WINDOW_P (w)) { @@ -10157,9 +10160,16 @@ current_matrix_up_to_date_p = (!NILP (w->window_end_valid) && !current_buffer->clip_changed + && !current_buffer->prevent_redisplay_optimizations_p && XFASTINT (w->last_modified) >= MODIFF && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF); + buffer_unchanged_p + = (!NILP (w->window_end_valid) + && !current_buffer->clip_changed + && END_UNCHANGED + BEG_UNCHANGED >= Z - BEG + && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF); + /* When windows_or_buffers_changed is non-zero, we can't rely on the window end being valid, so set it to nil there. */ if (windows_or_buffers_changed) @@ -10277,8 +10287,7 @@ w->window_end_valid = Qnil; /* Forget any recorded base line for line number display. */ - if (!current_matrix_up_to_date_p - || current_buffer->clip_changed) + if (!buffer_unchanged_p) w->base_line_number = Qnil; /* Redisplay the mode line. Select the buffer properly for that. @@ -10356,7 +10365,7 @@ /* Handle case where text has not changed, only point, and it has not moved off the frame. */ - if (current_matrix_up_to_date_p + if (buffer_unchanged_p && (rc = try_cursor_movement (window, startp, &temp_scroll_step), rc != CURSOR_MOVEMENT_CANNOT_BE_USED)) { @@ -10510,8 +10519,7 @@ /* w->vscroll = 0; */ /* Forget any previously recorded base line for line number display. */ - if (!current_matrix_up_to_date_p - || current_buffer->clip_changed) + if (!buffer_unchanged_p) w->base_line_number = Qnil; /* Move backward half the height of the window. */ @@ -11525,10 +11533,12 @@ if (windows_or_buffers_changed || cursor_type_changed) GIVE_UP (2); - /* Verify that narrowing has not changed. This flag is also set to prevent - redisplay optimizations. It would be nice to further + /* Verify that narrowing has not changed. + Also verify that we were not told to prevent redisplay optimizations. + It would be nice to further reduce the number of cases where this prevents try_window_id. */ - if (current_buffer->clip_changed) + if (current_buffer->clip_changed + || current_buffer->prevent_redisplay_optimizations_p) GIVE_UP (3); /* Window must either use window-based redisplay or be full width. */