aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/window.c b/src/window.c
index 33d7dab7ec0..dff449072f5 100644
--- a/src/window.c
+++ b/src/window.c
@@ -239,6 +239,17 @@ wset_combination (struct window *w, bool horflag, Lisp_Object val)
239 w->horizontal = horflag; 239 w->horizontal = horflag;
240} 240}
241 241
242/* Nonzero if leaf window W doesn't reflect the actual state
243 of displayed buffer due to its text or overlays change. */
244
245bool
246window_outdated (struct window *w)
247{
248 struct buffer *b = XBUFFER (w->contents);
249 return (w->last_modified < BUF_MODIFF (b)
250 || w->last_overlay_modified < BUF_OVERLAY_MODIFF (b));
251}
252
242struct window * 253struct window *
243decode_live_window (register Lisp_Object window) 254decode_live_window (register Lisp_Object window)
244{ 255{
@@ -1506,8 +1517,7 @@ if it isn't already recorded. */)
1506 || !w->window_end_valid 1517 || !w->window_end_valid
1507 || b->clip_changed 1518 || b->clip_changed
1508 || b->prevent_redisplay_optimizations_p 1519 || b->prevent_redisplay_optimizations_p
1509 || w->last_modified < BUF_MODIFF (b) 1520 || window_outdated (w))
1510 || w->last_overlay_modified < BUF_OVERLAY_MODIFF (b))
1511 && !noninteractive) 1521 && !noninteractive)
1512 { 1522 {
1513 struct text_pos startp; 1523 struct text_pos startp;
@@ -1720,8 +1730,7 @@ Return nil if window display is not up-to-date. In that case, use
1720 || windows_or_buffers_changed 1730 || windows_or_buffers_changed
1721 || b->clip_changed 1731 || b->clip_changed
1722 || b->prevent_redisplay_optimizations_p 1732 || b->prevent_redisplay_optimizations_p
1723 || w->last_modified < BUF_MODIFF (b) 1733 || window_outdated (w))
1724 || w->last_overlay_modified < BUF_OVERLAY_MODIFF (b))
1725 return Qnil; 1734 return Qnil;
1726 1735
1727 if (NILP (line)) 1736 if (NILP (line))