diff options
| author | Dmitry Antipov | 2013-01-22 15:48:00 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-01-22 15:48:00 +0400 |
| commit | 9d93ce29bdf8aa277123170ef37f942f87e5073b (patch) | |
| tree | d79715a54dab1dd39d37a71f8dc24e153e5af485 /src | |
| parent | 1dcb8ea26301d187273787450fda118f5fc3c1a6 (diff) | |
| download | emacs-9d93ce29bdf8aa277123170ef37f942f87e5073b.tar.gz emacs-9d93ce29bdf8aa277123170ef37f942f87e5073b.zip | |
* window.h (struct window): Change window_end_valid member from
Lisp_Object to a bitfield. Adjust comments.
(wset_window_end_valid): Remove.
* window.c (adjust_window_count): Clear window_end_valid.
(Fwindow_end): Adjust user. Remove ancient #if 0 code.
(Fwindow_line_height, set_window_buffer, Frecenter)
(Fsplit_window_internal, Fdelete_other_windows_internal)
(Fset_window_fringes, Fset_window_scroll_bars): Adjust users.
* dispnew.c (adjust_glyph_matrix, clear_window_matrices): Likewise.
* xdisp.c (check_window_end, reconsider_clip_changes)
(redisplay_internal, mark_window_display_accurate_1, redisplay_window)
(try_window, try_window_reusing_current_matrix, note_mouse_highlight)
(find_first_unchanged_at_end_row, try_window_id): Likewise.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 16 | ||||
| -rw-r--r-- | src/dispnew.c | 4 | ||||
| -rw-r--r-- | src/window.c | 29 | ||||
| -rw-r--r-- | src/window.h | 26 | ||||
| -rw-r--r-- | src/xdisp.c | 45 |
5 files changed, 61 insertions, 59 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ec7f8f068bd..7dc7b25f85a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,21 @@ | |||
| 1 | 2013-01-22 Dmitry Antipov <dmantipov@yandex.ru> | 1 | 2013-01-22 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 2 | ||
| 3 | * window.h (struct window): Change window_end_valid member from | ||
| 4 | Lisp_Object to a bitfield. Adjust comments. | ||
| 5 | (wset_window_end_valid): Remove. | ||
| 6 | * window.c (adjust_window_count): Clear window_end_valid. | ||
| 7 | (Fwindow_end): Adjust user. Remove ancient #if 0 code. | ||
| 8 | (Fwindow_line_height, set_window_buffer, Frecenter) | ||
| 9 | (Fsplit_window_internal, Fdelete_other_windows_internal) | ||
| 10 | (Fset_window_fringes, Fset_window_scroll_bars): Adjust users. | ||
| 11 | * dispnew.c (adjust_glyph_matrix, clear_window_matrices): Likewise. | ||
| 12 | * xdisp.c (check_window_end, reconsider_clip_changes) | ||
| 13 | (redisplay_internal, mark_window_display_accurate_1, redisplay_window) | ||
| 14 | (try_window, try_window_reusing_current_matrix, note_mouse_highlight) | ||
| 15 | (find_first_unchanged_at_end_row, try_window_id): Likewise. | ||
| 16 | |||
| 17 | 2013-01-22 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 18 | |||
| 3 | * xdisp.c (mark_window_display_accurate): Simplify the loop | 19 | * xdisp.c (mark_window_display_accurate): Simplify the loop |
| 4 | assuming that the only one of vchild, hchild or buffer window | 20 | assuming that the only one of vchild, hchild or buffer window |
| 5 | slots is non-nil. Call mark_window_display_accurate_1 for | 21 | slots is non-nil. Call mark_window_display_accurate_1 for |
diff --git a/src/dispnew.c b/src/dispnew.c index 1e9d94f3789..0dba576e101 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -607,7 +607,7 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y | |||
| 607 | are invalidated below. */ | 607 | are invalidated below. */ |
| 608 | if (INTEGERP (w->window_end_vpos) | 608 | if (INTEGERP (w->window_end_vpos) |
| 609 | && XFASTINT (w->window_end_vpos) >= i) | 609 | && XFASTINT (w->window_end_vpos) >= i) |
| 610 | wset_window_end_valid (w, Qnil); | 610 | w->window_end_valid = 0; |
| 611 | 611 | ||
| 612 | while (i < matrix->nrows) | 612 | while (i < matrix->nrows) |
| 613 | matrix->rows[i++].enabled_p = 0; | 613 | matrix->rows[i++].enabled_p = 0; |
| @@ -862,7 +862,7 @@ clear_window_matrices (struct window *w, bool desired_p) | |||
| 862 | else | 862 | else |
| 863 | { | 863 | { |
| 864 | clear_glyph_matrix (w->current_matrix); | 864 | clear_glyph_matrix (w->current_matrix); |
| 865 | wset_window_end_valid (w, Qnil); | 865 | w->window_end_valid = 0; |
| 866 | } | 866 | } |
| 867 | } | 867 | } |
| 868 | 868 | ||
diff --git a/src/window.c b/src/window.c index e60b9e8967d..db00bc26482 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -286,6 +286,8 @@ adjust_window_count (struct window *w, int arg) | |||
| 286 | b = b->base_buffer; | 286 | b = b->base_buffer; |
| 287 | b->window_count += arg; | 287 | b->window_count += arg; |
| 288 | eassert (b->window_count >= 0); | 288 | eassert (b->window_count >= 0); |
| 289 | /* Catch redisplay's attention. */ | ||
| 290 | w->window_end_valid = 0; | ||
| 289 | } | 291 | } |
| 290 | } | 292 | } |
| 291 | 293 | ||
| @@ -1489,17 +1491,8 @@ if it isn't already recorded. */) | |||
| 1489 | CHECK_BUFFER (buf); | 1491 | CHECK_BUFFER (buf); |
| 1490 | b = XBUFFER (buf); | 1492 | b = XBUFFER (buf); |
| 1491 | 1493 | ||
| 1492 | #if 0 /* This change broke some things. We should make it later. */ | ||
| 1493 | /* If we don't know the end position, return nil. | ||
| 1494 | The user can compute it with vertical-motion if he wants to. | ||
| 1495 | It would be nicer to do it automatically, | ||
| 1496 | but that's so slow that it would probably bother people. */ | ||
| 1497 | if (NILP (w->window_end_valid)) | ||
| 1498 | return Qnil; | ||
| 1499 | #endif | ||
| 1500 | |||
| 1501 | if (! NILP (update) | 1494 | if (! NILP (update) |
| 1502 | && (windows_or_buffers_changed || NILP (w->window_end_valid)) | 1495 | && (windows_or_buffers_changed || !w->window_end_valid) |
| 1503 | && !noninteractive) | 1496 | && !noninteractive) |
| 1504 | { | 1497 | { |
| 1505 | struct text_pos startp; | 1498 | struct text_pos startp; |
| @@ -1706,7 +1699,7 @@ Return nil if window display is not up-to-date. In that case, use | |||
| 1706 | b = XBUFFER (w->buffer); | 1699 | b = XBUFFER (w->buffer); |
| 1707 | 1700 | ||
| 1708 | /* Fail if current matrix is not up-to-date. */ | 1701 | /* Fail if current matrix is not up-to-date. */ |
| 1709 | if (NILP (w->window_end_valid) | 1702 | if (!w->window_end_valid |
| 1710 | || current_buffer->clip_changed | 1703 | || current_buffer->clip_changed |
| 1711 | || current_buffer->prevent_redisplay_optimizations_p | 1704 | || current_buffer->prevent_redisplay_optimizations_p |
| 1712 | || w->last_modified < BUF_MODIFF (b) | 1705 | || w->last_modified < BUF_MODIFF (b) |
| @@ -2038,7 +2031,7 @@ replace_window (Lisp_Object old, Lisp_Object new, int setflag) | |||
| 2038 | n->pseudo_window_p = 0; | 2031 | n->pseudo_window_p = 0; |
| 2039 | wset_window_end_vpos (n, make_number (0)); | 2032 | wset_window_end_vpos (n, make_number (0)); |
| 2040 | wset_window_end_pos (n, make_number (0)); | 2033 | wset_window_end_pos (n, make_number (0)); |
| 2041 | wset_window_end_valid (n, Qnil); | 2034 | n->window_end_valid = 0; |
| 2042 | n->frozen_window_start_p = 0; | 2035 | n->frozen_window_start_p = 0; |
| 2043 | } | 2036 | } |
| 2044 | 2037 | ||
| @@ -2973,7 +2966,7 @@ window-start value is reasonable when this function is called. */) | |||
| 2973 | pos = *vmotion (startpos, -top, w); | 2966 | pos = *vmotion (startpos, -top, w); |
| 2974 | 2967 | ||
| 2975 | set_marker_both (w->start, w->buffer, pos.bufpos, pos.bytepos); | 2968 | set_marker_both (w->start, w->buffer, pos.bufpos, pos.bytepos); |
| 2976 | wset_window_end_valid (w, Qnil); | 2969 | w->window_end_valid = 0; |
| 2977 | w->start_at_line_beg = (pos.bytepos == BEGV_BYTE | 2970 | w->start_at_line_beg = (pos.bytepos == BEGV_BYTE |
| 2978 | || FETCH_BYTE (pos.bytepos - 1) == '\n'); | 2971 | || FETCH_BYTE (pos.bytepos - 1) == '\n'); |
| 2979 | /* We need to do this, so that the window-scroll-functions | 2972 | /* We need to do this, so that the window-scroll-functions |
| @@ -3189,7 +3182,7 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int | |||
| 3189 | wset_window_end_pos (w, make_number (0)); | 3182 | wset_window_end_pos (w, make_number (0)); |
| 3190 | wset_window_end_vpos (w, make_number (0)); | 3183 | wset_window_end_vpos (w, make_number (0)); |
| 3191 | memset (&w->last_cursor, 0, sizeof w->last_cursor); | 3184 | memset (&w->last_cursor, 0, sizeof w->last_cursor); |
| 3192 | wset_window_end_valid (w, Qnil); | 3185 | |
| 3193 | if (!(keep_margins_p && samebuf)) | 3186 | if (!(keep_margins_p && samebuf)) |
| 3194 | { /* If we're not actually changing the buffer, don't reset hscroll and | 3187 | { /* If we're not actually changing the buffer, don't reset hscroll and |
| 3195 | vscroll. This case happens for example when called from | 3188 | vscroll. This case happens for example when called from |
| @@ -3958,7 +3951,7 @@ set correctly. See the code of `split-window' for how this is done. */) | |||
| 3958 | wset_next (o, new); | 3951 | wset_next (o, new); |
| 3959 | } | 3952 | } |
| 3960 | 3953 | ||
| 3961 | wset_window_end_valid (n, Qnil); | 3954 | n->window_end_valid = 0; |
| 3962 | memset (&n->last_cursor, 0, sizeof n->last_cursor); | 3955 | memset (&n->last_cursor, 0, sizeof n->last_cursor); |
| 3963 | 3956 | ||
| 3964 | /* Get special geometry settings from reference window. */ | 3957 | /* Get special geometry settings from reference window. */ |
| @@ -5368,7 +5361,7 @@ and redisplay normally--don't erase and redraw the frame. */) | |||
| 5368 | 5361 | ||
| 5369 | /* Set the new window start. */ | 5362 | /* Set the new window start. */ |
| 5370 | set_marker_both (w->start, w->buffer, charpos, bytepos); | 5363 | set_marker_both (w->start, w->buffer, charpos, bytepos); |
| 5371 | wset_window_end_valid (w, Qnil); | 5364 | w->window_end_valid = 0; |
| 5372 | 5365 | ||
| 5373 | w->optional_new_start = 1; | 5366 | w->optional_new_start = 1; |
| 5374 | 5367 | ||
| @@ -6319,7 +6312,7 @@ display marginal areas and the text area. */) | |||
| 6319 | adjust_window_margins (w); | 6312 | adjust_window_margins (w); |
| 6320 | 6313 | ||
| 6321 | clear_glyph_matrix (w->current_matrix); | 6314 | clear_glyph_matrix (w->current_matrix); |
| 6322 | wset_window_end_valid (w, Qnil); | 6315 | w->window_end_valid = 0; |
| 6323 | 6316 | ||
| 6324 | ++windows_or_buffers_changed; | 6317 | ++windows_or_buffers_changed; |
| 6325 | adjust_glyphs (XFRAME (WINDOW_FRAME (w))); | 6318 | adjust_glyphs (XFRAME (WINDOW_FRAME (w))); |
| @@ -6389,7 +6382,7 @@ Fourth parameter HORIZONTAL-TYPE is currently unused. */) | |||
| 6389 | adjust_window_margins (w); | 6382 | adjust_window_margins (w); |
| 6390 | 6383 | ||
| 6391 | clear_glyph_matrix (w->current_matrix); | 6384 | clear_glyph_matrix (w->current_matrix); |
| 6392 | wset_window_end_valid (w, Qnil); | 6385 | w->window_end_valid = 0; |
| 6393 | 6386 | ||
| 6394 | ++windows_or_buffers_changed; | 6387 | ++windows_or_buffers_changed; |
| 6395 | adjust_glyphs (XFRAME (WINDOW_FRAME (w))); | 6388 | adjust_glyphs (XFRAME (WINDOW_FRAME (w))); |
diff --git a/src/window.h b/src/window.h index 1ebd35a7c64..135f591ded7 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -175,17 +175,13 @@ struct window | |||
| 175 | no scroll bar. A value of t means use frame value. */ | 175 | no scroll bar. A value of t means use frame value. */ |
| 176 | Lisp_Object vertical_scroll_bar_type; | 176 | Lisp_Object vertical_scroll_bar_type; |
| 177 | 177 | ||
| 178 | /* Z - the buffer position of the last glyph in the current matrix | 178 | /* Z - the buffer position of the last glyph in the current |
| 179 | of W. Only valid if WINDOW_END_VALID is not nil. */ | 179 | matrix of W. Only valid if window_end_valid is nonzero. */ |
| 180 | Lisp_Object window_end_pos; | 180 | Lisp_Object window_end_pos; |
| 181 | |||
| 181 | /* Glyph matrix row of the last glyph in the current matrix | 182 | /* Glyph matrix row of the last glyph in the current matrix |
| 182 | of W. Only valid if WINDOW_END_VALID is not nil. */ | 183 | of W. Only valid if window_end_valid is nonzero. */ |
| 183 | Lisp_Object window_end_vpos; | 184 | Lisp_Object window_end_vpos; |
| 184 | /* t if window_end_pos is truly valid. | ||
| 185 | This is nil if nontrivial redisplay is preempted | ||
| 186 | since in that case the frame image that window_end_pos | ||
| 187 | did not get onto the frame. */ | ||
| 188 | Lisp_Object window_end_valid; | ||
| 189 | 185 | ||
| 190 | /* Display-table to use for displaying chars in this window. | 186 | /* Display-table to use for displaying chars in this window. |
| 191 | Nil means use the buffer's own display-table. */ | 187 | Nil means use the buffer's own display-table. */ |
| @@ -339,12 +335,17 @@ struct window | |||
| 339 | Otherwise draw them between margin areas and text. */ | 335 | Otherwise draw them between margin areas and text. */ |
| 340 | unsigned fringes_outside_margins : 1; | 336 | unsigned fringes_outside_margins : 1; |
| 341 | 337 | ||
| 338 | /* Nonzero if window_end_pos and window_end_vpos are truly valid. | ||
| 339 | This is zero if nontrivial redisplay is preempted since in that case | ||
| 340 | the frame image that window_end_pos did not get onto the frame. */ | ||
| 341 | unsigned window_end_valid : 1; | ||
| 342 | |||
| 342 | /* Amount by which lines of this window are scrolled in | 343 | /* Amount by which lines of this window are scrolled in |
| 343 | y-direction (smooth scrolling). */ | 344 | y-direction (smooth scrolling). */ |
| 344 | int vscroll; | 345 | int vscroll; |
| 345 | 346 | ||
| 346 | /* Z_BYTE - Buffer position of the last glyph in the current matrix of W. | 347 | /* Z_BYTE - buffer position of the last glyph in the current matrix of W. |
| 347 | Should be nonnegative, and only valid if window_end_valid is not nil. */ | 348 | Should be nonnegative, and only valid if window_end_valid is nonzero. */ |
| 348 | ptrdiff_t window_end_bytepos; | 349 | ptrdiff_t window_end_bytepos; |
| 349 | }; | 350 | }; |
| 350 | 351 | ||
| @@ -401,11 +402,6 @@ wset_window_end_pos (struct window *w, Lisp_Object val) | |||
| 401 | w->window_end_pos = val; | 402 | w->window_end_pos = val; |
| 402 | } | 403 | } |
| 403 | WINDOW_INLINE void | 404 | WINDOW_INLINE void |
| 404 | wset_window_end_valid (struct window *w, Lisp_Object val) | ||
| 405 | { | ||
| 406 | w->window_end_valid = val; | ||
| 407 | } | ||
| 408 | WINDOW_INLINE void | ||
| 409 | wset_window_end_vpos (struct window *w, Lisp_Object val) | 405 | wset_window_end_vpos (struct window *w, Lisp_Object val) |
| 410 | { | 406 | { |
| 411 | w->window_end_vpos = val; | 407 | w->window_end_vpos = val; |
diff --git a/src/xdisp.c b/src/xdisp.c index 69a8a02b2cb..d663e56acc0 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -2539,8 +2539,7 @@ check_it (struct it *it) | |||
| 2539 | static void | 2539 | static void |
| 2540 | check_window_end (struct window *w) | 2540 | check_window_end (struct window *w) |
| 2541 | { | 2541 | { |
| 2542 | if (!MINI_WINDOW_P (w) | 2542 | if (!MINI_WINDOW_P (w) && w->window_end_valid) |
| 2543 | && !NILP (w->window_end_valid)) | ||
| 2544 | { | 2543 | { |
| 2545 | struct glyph_row *row; | 2544 | struct glyph_row *row; |
| 2546 | eassert ((row = MATRIX_ROW (w->current_matrix, | 2545 | eassert ((row = MATRIX_ROW (w->current_matrix, |
| @@ -12922,10 +12921,10 @@ static void | |||
| 12922 | reconsider_clip_changes (struct window *w, struct buffer *b) | 12921 | reconsider_clip_changes (struct window *w, struct buffer *b) |
| 12923 | { | 12922 | { |
| 12924 | if (b->clip_changed | 12923 | if (b->clip_changed |
| 12925 | && !NILP (w->window_end_valid) | 12924 | && w->window_end_valid |
| 12926 | && w->current_matrix->buffer == b | 12925 | && w->current_matrix->buffer == b |
| 12927 | && w->current_matrix->zv == BUF_ZV (b) | 12926 | && w->current_matrix->zv == BUF_ZV (b) |
| 12928 | && w->current_matrix->begv == BUF_BEGV (b)) | 12927 | && w->current_matrix->begv == BUF_BEGV (b)) |
| 12929 | b->clip_changed = 0; | 12928 | b->clip_changed = 0; |
| 12930 | 12929 | ||
| 12931 | /* If display wasn't paused, and W is not a tool bar window, see if | 12930 | /* If display wasn't paused, and W is not a tool bar window, see if |
| @@ -12933,8 +12932,7 @@ reconsider_clip_changes (struct window *w, struct buffer *b) | |||
| 12933 | we set b->clip_changed to 1 to force updating the screen. If | 12932 | we set b->clip_changed to 1 to force updating the screen. If |
| 12934 | b->clip_changed has already been set to 1, we can skip this | 12933 | b->clip_changed has already been set to 1, we can skip this |
| 12935 | check. */ | 12934 | check. */ |
| 12936 | if (!b->clip_changed | 12935 | if (!b->clip_changed && BUFFERP (w->buffer) && w->window_end_valid) |
| 12937 | && BUFFERP (w->buffer) && !NILP (w->window_end_valid)) | ||
| 12938 | { | 12936 | { |
| 12939 | ptrdiff_t pt; | 12937 | ptrdiff_t pt; |
| 12940 | 12938 | ||
| @@ -13328,7 +13326,7 @@ redisplay_internal (void) | |||
| 13328 | else if (XFASTINT (w->window_end_vpos) == this_line_vpos | 13326 | else if (XFASTINT (w->window_end_vpos) == this_line_vpos |
| 13329 | && this_line_vpos > 0) | 13327 | && this_line_vpos > 0) |
| 13330 | wset_window_end_vpos (w, make_number (this_line_vpos - 1)); | 13328 | wset_window_end_vpos (w, make_number (this_line_vpos - 1)); |
| 13331 | wset_window_end_valid (w, Qnil); | 13329 | w->window_end_valid = 0; |
| 13332 | 13330 | ||
| 13333 | /* Update hint: No need to try to scroll in update_window. */ | 13331 | /* Update hint: No need to try to scroll in update_window. */ |
| 13334 | w->desired_matrix->no_scrolling_p = 1; | 13332 | w->desired_matrix->no_scrolling_p = 1; |
| @@ -13758,7 +13756,7 @@ mark_window_display_accurate_1 (struct window *w, int accurate_p) | |||
| 13758 | else | 13756 | else |
| 13759 | w->last_point = marker_position (w->pointm); | 13757 | w->last_point = marker_position (w->pointm); |
| 13760 | 13758 | ||
| 13761 | wset_window_end_valid (w, w->buffer); | 13759 | w->window_end_valid = 1; |
| 13762 | w->update_mode_line = 0; | 13760 | w->update_mode_line = 0; |
| 13763 | } | 13761 | } |
| 13764 | } | 13762 | } |
| @@ -15460,7 +15458,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15460 | set_buffer_internal_1 (XBUFFER (w->buffer)); | 15458 | set_buffer_internal_1 (XBUFFER (w->buffer)); |
| 15461 | 15459 | ||
| 15462 | current_matrix_up_to_date_p | 15460 | current_matrix_up_to_date_p |
| 15463 | = (!NILP (w->window_end_valid) | 15461 | = (w->window_end_valid |
| 15464 | && !current_buffer->clip_changed | 15462 | && !current_buffer->clip_changed |
| 15465 | && !current_buffer->prevent_redisplay_optimizations_p | 15463 | && !current_buffer->prevent_redisplay_optimizations_p |
| 15466 | && !window_outdated (w)); | 15464 | && !window_outdated (w)); |
| @@ -15483,7 +15481,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15483 | specbind (Qinhibit_point_motion_hooks, Qt); | 15481 | specbind (Qinhibit_point_motion_hooks, Qt); |
| 15484 | 15482 | ||
| 15485 | buffer_unchanged_p | 15483 | buffer_unchanged_p |
| 15486 | = (!NILP (w->window_end_valid) | 15484 | = (w->window_end_valid |
| 15487 | && !current_buffer->clip_changed | 15485 | && !current_buffer->clip_changed |
| 15488 | && !window_outdated (w)); | 15486 | && !window_outdated (w)); |
| 15489 | 15487 | ||
| @@ -15496,7 +15494,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15496 | if (XMARKER (w->start)->buffer == current_buffer) | 15494 | if (XMARKER (w->start)->buffer == current_buffer) |
| 15497 | compute_window_start_on_continuation_line (w); | 15495 | compute_window_start_on_continuation_line (w); |
| 15498 | 15496 | ||
| 15499 | wset_window_end_valid (w, Qnil); | 15497 | w->window_end_valid = 0; |
| 15500 | } | 15498 | } |
| 15501 | 15499 | ||
| 15502 | /* Some sanity checks. */ | 15500 | /* Some sanity checks. */ |
| @@ -15585,7 +15583,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15585 | 15583 | ||
| 15586 | w->force_start = 0; | 15584 | w->force_start = 0; |
| 15587 | w->vscroll = 0; | 15585 | w->vscroll = 0; |
| 15588 | wset_window_end_valid (w, Qnil); | 15586 | w->window_end_valid = 0; |
| 15589 | 15587 | ||
| 15590 | /* Forget any recorded base line for line number display. */ | 15588 | /* Forget any recorded base line for line number display. */ |
| 15591 | if (!buffer_unchanged_p) | 15589 | if (!buffer_unchanged_p) |
| @@ -16034,8 +16032,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 16034 | line.) */ | 16032 | line.) */ |
| 16035 | if (w->cursor.vpos < 0) | 16033 | if (w->cursor.vpos < 0) |
| 16036 | { | 16034 | { |
| 16037 | if (!NILP (w->window_end_valid) | 16035 | if (w->window_end_valid && PT >= Z - XFASTINT (w->window_end_pos)) |
| 16038 | && PT >= Z - XFASTINT (w->window_end_pos)) | ||
| 16039 | { | 16036 | { |
| 16040 | clear_glyph_matrix (w->desired_matrix); | 16037 | clear_glyph_matrix (w->desired_matrix); |
| 16041 | move_it_by_lines (&it, 1); | 16038 | move_it_by_lines (&it, 1); |
| @@ -16352,7 +16349,7 @@ try_window (Lisp_Object window, struct text_pos pos, int flags) | |||
| 16352 | } | 16349 | } |
| 16353 | 16350 | ||
| 16354 | /* But that is not valid info until redisplay finishes. */ | 16351 | /* But that is not valid info until redisplay finishes. */ |
| 16355 | wset_window_end_valid (w, Qnil); | 16352 | w->window_end_valid = 0; |
| 16356 | return 1; | 16353 | return 1; |
| 16357 | } | 16354 | } |
| 16358 | 16355 | ||
| @@ -16599,7 +16596,7 @@ try_window_reusing_current_matrix (struct window *w) | |||
| 16599 | wset_window_end_pos (w, make_number (Z - ZV)); | 16596 | wset_window_end_pos (w, make_number (Z - ZV)); |
| 16600 | wset_window_end_vpos (w, make_number (0)); | 16597 | wset_window_end_vpos (w, make_number (0)); |
| 16601 | } | 16598 | } |
| 16602 | wset_window_end_valid (w, Qnil); | 16599 | w->window_end_valid = 0; |
| 16603 | 16600 | ||
| 16604 | /* Update hint: don't try scrolling again in update_window. */ | 16601 | /* Update hint: don't try scrolling again in update_window. */ |
| 16605 | w->desired_matrix->no_scrolling_p = 1; | 16602 | w->desired_matrix->no_scrolling_p = 1; |
| @@ -16797,7 +16794,7 @@ try_window_reusing_current_matrix (struct window *w) | |||
| 16797 | (w, make_number (XFASTINT (w->window_end_vpos) - nrows_scrolled)); | 16794 | (w, make_number (XFASTINT (w->window_end_vpos) - nrows_scrolled)); |
| 16798 | } | 16795 | } |
| 16799 | 16796 | ||
| 16800 | wset_window_end_valid (w, Qnil); | 16797 | w->window_end_valid = 0; |
| 16801 | w->desired_matrix->no_scrolling_p = 1; | 16798 | w->desired_matrix->no_scrolling_p = 1; |
| 16802 | 16799 | ||
| 16803 | #ifdef GLYPH_DEBUG | 16800 | #ifdef GLYPH_DEBUG |
| @@ -16930,7 +16927,7 @@ find_first_unchanged_at_end_row (struct window *w, | |||
| 16930 | 16927 | ||
| 16931 | /* Display must not have been paused, otherwise the current matrix | 16928 | /* Display must not have been paused, otherwise the current matrix |
| 16932 | is not up to date. */ | 16929 | is not up to date. */ |
| 16933 | eassert (!NILP (w->window_end_valid)); | 16930 | eassert (w->window_end_valid); |
| 16934 | 16931 | ||
| 16935 | /* A value of window_end_pos >= END_UNCHANGED means that the window | 16932 | /* A value of window_end_pos >= END_UNCHANGED means that the window |
| 16936 | end is in the range of changed text. If so, there is no | 16933 | end is in the range of changed text. If so, there is no |
| @@ -17114,7 +17111,7 @@ row_containing_pos (struct window *w, ptrdiff_t charpos, | |||
| 17114 | 17111 | ||
| 17115 | /* Try to redisplay window W by reusing its existing display. W's | 17112 | /* Try to redisplay window W by reusing its existing display. W's |
| 17116 | current matrix must be up to date when this function is called, | 17113 | current matrix must be up to date when this function is called, |
| 17117 | i.e. window_end_valid must not be nil. | 17114 | i.e. window_end_valid must be nonzero. |
| 17118 | 17115 | ||
| 17119 | Value is | 17116 | Value is |
| 17120 | 17117 | ||
| @@ -17222,7 +17219,7 @@ try_window_id (struct window *w) | |||
| 17222 | GIVE_UP (7); | 17219 | GIVE_UP (7); |
| 17223 | 17220 | ||
| 17224 | /* Verify that display wasn't paused. */ | 17221 | /* Verify that display wasn't paused. */ |
| 17225 | if (NILP (w->window_end_valid)) | 17222 | if (!w->window_end_valid) |
| 17226 | GIVE_UP (8); | 17223 | GIVE_UP (8); |
| 17227 | 17224 | ||
| 17228 | /* Can't use this if highlighting a region because a cursor movement | 17225 | /* Can't use this if highlighting a region because a cursor movement |
| @@ -17873,7 +17870,7 @@ try_window_id (struct window *w) | |||
| 17873 | debug_end_vpos = XFASTINT (w->window_end_vpos)); | 17870 | debug_end_vpos = XFASTINT (w->window_end_vpos)); |
| 17874 | 17871 | ||
| 17875 | /* Record that display has not been completed. */ | 17872 | /* Record that display has not been completed. */ |
| 17876 | wset_window_end_valid (w, Qnil); | 17873 | w->window_end_valid = 0; |
| 17877 | w->desired_matrix->no_scrolling_p = 1; | 17874 | w->desired_matrix->no_scrolling_p = 1; |
| 17878 | return 3; | 17875 | return 3; |
| 17879 | 17876 | ||
| @@ -27782,7 +27779,7 @@ note_mouse_highlight (struct frame *f, int x, int y) | |||
| 27782 | And verify the buffer's text has not changed. */ | 27779 | And verify the buffer's text has not changed. */ |
| 27783 | b = XBUFFER (w->buffer); | 27780 | b = XBUFFER (w->buffer); |
| 27784 | if (part == ON_TEXT | 27781 | if (part == ON_TEXT |
| 27785 | && EQ (w->window_end_valid, w->buffer) | 27782 | && w->window_end_valid |
| 27786 | && w->last_modified == BUF_MODIFF (b) | 27783 | && w->last_modified == BUF_MODIFF (b) |
| 27787 | && w->last_overlay_modified == BUF_OVERLAY_MODIFF (b)) | 27784 | && w->last_overlay_modified == BUF_OVERLAY_MODIFF (b)) |
| 27788 | { | 27785 | { |