aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2013-04-11 19:06:47 +0300
committerEli Zaretskii2013-04-11 19:06:47 +0300
commitfcc1fe85416f7dda9a1b83faf88a55c170a41ac9 (patch)
tree558bc1bbca98583feb7f0f8c77c55937e8f0da49 /src
parentf07accae655f61468f3441dc48b61b5f125b601f (diff)
downloademacs-fcc1fe85416f7dda9a1b83faf88a55c170a41ac9.tar.gz
emacs-fcc1fe85416f7dda9a1b83faf88a55c170a41ac9.zip
Fix bug #14170 with window-end returning a stale value.
This bug was introduced in 2012-10-15T09:03:56Z!rudalics@gmx.at 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')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/window.c12
2 files changed, 18 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ff6b9508d62..7f4c59b8eb4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12013-04-11 Eli Zaretskii <eliz@gnu.org>
2
3 * window.c (Fwindow_end): Test more flags, including the buffer's
4 last_overlay_modified flag, to determine whether the window's
5 display is really up-to-date. Prevents the function from
6 returning a stale value. (Bug#14170)
7 (Fwindow_line_height): Fix the test for up-to-date-ness of the
8 current matrix.
9
12013-04-10 Eli Zaretskii <eliz@gnu.org> 102013-04-10 Eli Zaretskii <eliz@gnu.org>
2 11
3 * frame.c (do_switch_frame): Mark the TTY frame we switch to as 12 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
diff --git a/src/window.c b/src/window.c
index 2ddf742be99..fe5b5ec1e6e 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1493,7 +1493,12 @@ if it isn't already recorded. */)
1493 b = XBUFFER (buf); 1493 b = XBUFFER (buf);
1494 1494
1495 if (! NILP (update) 1495 if (! NILP (update)
1496 && (windows_or_buffers_changed || !w->window_end_valid) 1496 && (windows_or_buffers_changed
1497 || !w->window_end_valid
1498 || b->clip_changed
1499 || b->prevent_redisplay_optimizations_p
1500 || w->last_modified < BUF_MODIFF (b)
1501 || w->last_overlay_modified < BUF_OVERLAY_MODIFF (b))
1497 && !noninteractive) 1502 && !noninteractive)
1498 { 1503 {
1499 struct text_pos startp; 1504 struct text_pos startp;
@@ -1702,8 +1707,9 @@ Return nil if window display is not up-to-date. In that case, use
1702 1707
1703 /* Fail if current matrix is not up-to-date. */ 1708 /* Fail if current matrix is not up-to-date. */
1704 if (!w->window_end_valid 1709 if (!w->window_end_valid
1705 || current_buffer->clip_changed 1710 || windows_or_buffers_changed
1706 || current_buffer->prevent_redisplay_optimizations_p 1711 || b->clip_changed
1712 || b->prevent_redisplay_optimizations_p
1707 || w->last_modified < BUF_MODIFF (b) 1713 || w->last_modified < BUF_MODIFF (b)
1708 || w->last_overlay_modified < BUF_OVERLAY_MODIFF (b)) 1714 || w->last_overlay_modified < BUF_OVERLAY_MODIFF (b))
1709 return Qnil; 1715 return Qnil;