8420 |
struct window *w; |
struct window *w; |
8421 |
struct buffer *b; |
struct buffer *b; |
8422 |
{ |
{ |
8423 |
if (b->prevent_redisplay_optimizations_p) |
if (b->clip_changed |
|
b->clip_changed = 1; |
|
|
else if (b->clip_changed |
|
8424 |
&& !NILP (w->window_end_valid) |
&& !NILP (w->window_end_valid) |
8425 |
&& w->current_matrix->buffer == b |
&& w->current_matrix->buffer == b |
8426 |
&& w->current_matrix->zv == BUF_ZV (b) |
&& w->current_matrix->zv == BUF_ZV (b) |
8687 |
&& CHARPOS (tlbufpos) > 0 |
&& CHARPOS (tlbufpos) > 0 |
8688 |
&& NILP (w->update_mode_line) |
&& NILP (w->update_mode_line) |
8689 |
&& !current_buffer->clip_changed |
&& !current_buffer->clip_changed |
8690 |
|
&& !current_buffer->prevent_redisplay_optimizations_p |
8691 |
&& FRAME_VISIBLE_P (XFRAME (w->frame)) |
&& FRAME_VISIBLE_P (XFRAME (w->frame)) |
8692 |
&& !FRAME_OBSCURED_P (XFRAME (w->frame)) |
&& !FRAME_OBSCURED_P (XFRAME (w->frame)) |
8693 |
/* Make sure recorded data applies to current buffer, etc. */ |
/* Make sure recorded data applies to current buffer, etc. */ |
10092 |
struct it it; |
struct it it; |
10093 |
/* Record it now because it's overwritten. */ |
/* Record it now because it's overwritten. */ |
10094 |
int current_matrix_up_to_date_p = 0; |
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; |
10098 |
int temp_scroll_step = 0; |
int temp_scroll_step = 0; |
10099 |
int count = SPECPDL_INDEX (); |
int count = SPECPDL_INDEX (); |
10100 |
int rc; |
int rc; |
10116 |
/* Has the mode line to be updated? */ |
/* Has the mode line to be updated? */ |
10117 |
update_mode_line = (!NILP (w->update_mode_line) |
update_mode_line = (!NILP (w->update_mode_line) |
10118 |
|| update_mode_lines |
|| update_mode_lines |
10119 |
|| buffer->clip_changed); |
|| buffer->clip_changed |
10120 |
|
|| buffer->prevent_redisplay_optimizations_p); |
10121 |
|
|
10122 |
if (MINI_WINDOW_P (w)) |
if (MINI_WINDOW_P (w)) |
10123 |
{ |
{ |
10160 |
current_matrix_up_to_date_p |
current_matrix_up_to_date_p |
10161 |
= (!NILP (w->window_end_valid) |
= (!NILP (w->window_end_valid) |
10162 |
&& !current_buffer->clip_changed |
&& !current_buffer->clip_changed |
10163 |
|
&& !current_buffer->prevent_redisplay_optimizations_p |
10164 |
&& XFASTINT (w->last_modified) >= MODIFF |
&& XFASTINT (w->last_modified) >= MODIFF |
10165 |
&& XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF); |
&& XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF); |
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 |
|
|
10173 |
/* When windows_or_buffers_changed is non-zero, we can't rely on |
/* When windows_or_buffers_changed is non-zero, we can't rely on |
10174 |
the window end being valid, so set it to nil there. */ |
the window end being valid, so set it to nil there. */ |
10175 |
if (windows_or_buffers_changed) |
if (windows_or_buffers_changed) |
10287 |
w->window_end_valid = Qnil; |
w->window_end_valid = Qnil; |
10288 |
|
|
10289 |
/* Forget any recorded base line for line number display. */ |
/* Forget any recorded base line for line number display. */ |
10290 |
if (!current_matrix_up_to_date_p |
if (!buffer_unchanged_p) |
|
|| current_buffer->clip_changed) |
|
10291 |
w->base_line_number = Qnil; |
w->base_line_number = Qnil; |
10292 |
|
|
10293 |
/* Redisplay the mode line. Select the buffer properly for that. |
/* Redisplay the mode line. Select the buffer properly for that. |
10365 |
|
|
10366 |
/* Handle case where text has not changed, only point, and it has |
/* Handle case where text has not changed, only point, and it has |
10367 |
not moved off the frame. */ |
not moved off the frame. */ |
10368 |
if (current_matrix_up_to_date_p |
if (buffer_unchanged_p |
10369 |
&& (rc = try_cursor_movement (window, startp, &temp_scroll_step), |
&& (rc = try_cursor_movement (window, startp, &temp_scroll_step), |
10370 |
rc != CURSOR_MOVEMENT_CANNOT_BE_USED)) |
rc != CURSOR_MOVEMENT_CANNOT_BE_USED)) |
10371 |
{ |
{ |
10519 |
/* w->vscroll = 0; */ |
/* w->vscroll = 0; */ |
10520 |
|
|
10521 |
/* Forget any previously recorded base line for line number display. */ |
/* Forget any previously recorded base line for line number display. */ |
10522 |
if (!current_matrix_up_to_date_p |
if (!buffer_unchanged_p) |
|
|| current_buffer->clip_changed) |
|
10523 |
w->base_line_number = Qnil; |
w->base_line_number = Qnil; |
10524 |
|
|
10525 |
/* Move backward half the height of the window. */ |
/* Move backward half the height of the window. */ |
11533 |
if (windows_or_buffers_changed || cursor_type_changed) |
if (windows_or_buffers_changed || cursor_type_changed) |
11534 |
GIVE_UP (2); |
GIVE_UP (2); |
11535 |
|
|
11536 |
/* Verify that narrowing has not changed. This flag is also set to prevent |
/* Verify that narrowing has not changed. |
11537 |
redisplay optimizations. It would be nice to further |
Also verify that we were not told to prevent redisplay optimizations. |
11538 |
|
It would be nice to further |
11539 |
reduce the number of cases where this prevents try_window_id. */ |
reduce the number of cases where this prevents try_window_id. */ |
11540 |
if (current_buffer->clip_changed) |
if (current_buffer->clip_changed |
11541 |
|
|| current_buffer->prevent_redisplay_optimizations_p) |
11542 |
GIVE_UP (3); |
GIVE_UP (3); |
11543 |
|
|
11544 |
/* Window must either use window-based redisplay or be full width. */ |
/* Window must either use window-based redisplay or be full width. */ |