diff options
author | Eli Zaretskii <[email protected]> | 2013-04-11 19:06:47 +0300 |
---|---|---|
committer | Eli Zaretskii <[email protected]> | 2013-04-11 19:06:47 +0300 |
commit | fcc1fe85416f7dda9a1b83faf88a55c170a41ac9 (patch) | |
tree | 558bc1bbca98583feb7f0f8c77c55937e8f0da49 /src/window.c | |
parent | f07accae655f61468f3441dc48b61b5f125b601f (diff) |
Fix bug #14170 with window-end returning a stale value.
This bug was introduced in 2012-10-15T09:03:[email protected]
while solving bug #12600.
src/window.c (Fwindow_end): Test more flags, including the buffer's
last_overlay_modified flag, to determine whether the window's
display is really up-to-date. Prevents the function from
returning a stale value.
(Fwindow_line_height): Fix the test for up-to-date-ness of the
current matrix.
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c index 2ddf742be9..fe5b5ec1e6 100644 --- a/src/window.c +++ b/src/window.c @@ -1493,7 +1493,12 @@ if it isn't already recorded. */) b = XBUFFER (buf); if (! NILP (update) - && (windows_or_buffers_changed || !w->window_end_valid) + && (windows_or_buffers_changed + || !w->window_end_valid + || b->clip_changed + || b->prevent_redisplay_optimizations_p + || w->last_modified < BUF_MODIFF (b) + || w->last_overlay_modified < BUF_OVERLAY_MODIFF (b)) && !noninteractive) { struct text_pos startp; @@ -1702,8 +1707,9 @@ Return nil if window display is not up-to-date. In that case, use /* Fail if current matrix is not up-to-date. */ if (!w->window_end_valid - || current_buffer->clip_changed - || current_buffer->prevent_redisplay_optimizations_p + || windows_or_buffers_changed + || b->clip_changed + || b->prevent_redisplay_optimizations_p || w->last_modified < BUF_MODIFF (b) || w->last_overlay_modified < BUF_OVERLAY_MODIFF (b)) return Qnil; |