+2013-04-11 Eli Zaretskii <eliz@gnu.org>
+
+ * 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. (Bug#14170)
+ (Fwindow_line_height): Fix the test for up-to-date-ness of the
+ current matrix.
+
2013-04-10 Eli Zaretskii <eliz@gnu.org>
* frame.c (do_switch_frame): Mark the TTY frame we switch to as
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;
/* 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;