aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorJoakim Verona2013-01-23 00:03:32 +0100
committerJoakim Verona2013-01-23 00:03:32 +0100
commit6f0e40ae28faeba85872002eb848debb6bfcb2f5 (patch)
tree1134bfbb02414c992f239247b8c132a0d6d748c6 /src/window.c
parent2adf26f58a2435bcbd7f925f7e1208ceda907520 (diff)
parent9d93ce29bdf8aa277123170ef37f942f87e5073b (diff)
downloademacs-6f0e40ae28faeba85872002eb848debb6bfcb2f5.tar.gz
emacs-6f0e40ae28faeba85872002eb848debb6bfcb2f5.zip
auto upstream
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/src/window.c b/src/window.c
index d38f4c10671..906cfe6ba9d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -287,6 +287,8 @@ adjust_window_count (struct window *w, int arg)
287 b = b->base_buffer; 287 b = b->base_buffer;
288 b->window_count += arg; 288 b->window_count += arg;
289 eassert (b->window_count >= 0); 289 eassert (b->window_count >= 0);
290 /* Catch redisplay's attention. */
291 w->window_end_valid = 0;
290 } 292 }
291} 293}
292 294
@@ -1490,17 +1492,8 @@ if it isn't already recorded. */)
1490 CHECK_BUFFER (buf); 1492 CHECK_BUFFER (buf);
1491 b = XBUFFER (buf); 1493 b = XBUFFER (buf);
1492 1494
1493#if 0 /* This change broke some things. We should make it later. */
1494 /* If we don't know the end position, return nil.
1495 The user can compute it with vertical-motion if he wants to.
1496 It would be nicer to do it automatically,
1497 but that's so slow that it would probably bother people. */
1498 if (NILP (w->window_end_valid))
1499 return Qnil;
1500#endif
1501
1502 if (! NILP (update) 1495 if (! NILP (update)
1503 && (windows_or_buffers_changed || NILP (w->window_end_valid)) 1496 && (windows_or_buffers_changed || !w->window_end_valid)
1504 && !noninteractive) 1497 && !noninteractive)
1505 { 1498 {
1506 struct text_pos startp; 1499 struct text_pos startp;
@@ -1707,7 +1700,7 @@ Return nil if window display is not up-to-date. In that case, use
1707 b = XBUFFER (w->buffer); 1700 b = XBUFFER (w->buffer);
1708 1701
1709 /* Fail if current matrix is not up-to-date. */ 1702 /* Fail if current matrix is not up-to-date. */
1710 if (NILP (w->window_end_valid) 1703 if (!w->window_end_valid
1711 || current_buffer->clip_changed 1704 || current_buffer->clip_changed
1712 || current_buffer->prevent_redisplay_optimizations_p 1705 || current_buffer->prevent_redisplay_optimizations_p
1713 || w->last_modified < BUF_MODIFF (b) 1706 || w->last_modified < BUF_MODIFF (b)
@@ -2039,7 +2032,7 @@ replace_window (Lisp_Object old, Lisp_Object new, int setflag)
2039 n->pseudo_window_p = 0; 2032 n->pseudo_window_p = 0;
2040 wset_window_end_vpos (n, make_number (0)); 2033 wset_window_end_vpos (n, make_number (0));
2041 wset_window_end_pos (n, make_number (0)); 2034 wset_window_end_pos (n, make_number (0));
2042 wset_window_end_valid (n, Qnil); 2035 n->window_end_valid = 0;
2043 n->frozen_window_start_p = 0; 2036 n->frozen_window_start_p = 0;
2044 } 2037 }
2045 2038
@@ -2974,7 +2967,7 @@ window-start value is reasonable when this function is called. */)
2974 pos = *vmotion (startpos, -top, w); 2967 pos = *vmotion (startpos, -top, w);
2975 2968
2976 set_marker_both (w->start, w->buffer, pos.bufpos, pos.bytepos); 2969 set_marker_both (w->start, w->buffer, pos.bufpos, pos.bytepos);
2977 wset_window_end_valid (w, Qnil); 2970 w->window_end_valid = 0;
2978 w->start_at_line_beg = (pos.bytepos == BEGV_BYTE 2971 w->start_at_line_beg = (pos.bytepos == BEGV_BYTE
2979 || FETCH_BYTE (pos.bytepos - 1) == '\n'); 2972 || FETCH_BYTE (pos.bytepos - 1) == '\n');
2980 /* We need to do this, so that the window-scroll-functions 2973 /* We need to do this, so that the window-scroll-functions
@@ -3190,7 +3183,7 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int
3190 wset_window_end_pos (w, make_number (0)); 3183 wset_window_end_pos (w, make_number (0));
3191 wset_window_end_vpos (w, make_number (0)); 3184 wset_window_end_vpos (w, make_number (0));
3192 memset (&w->last_cursor, 0, sizeof w->last_cursor); 3185 memset (&w->last_cursor, 0, sizeof w->last_cursor);
3193 wset_window_end_valid (w, Qnil); 3186
3194 if (!(keep_margins_p && samebuf)) 3187 if (!(keep_margins_p && samebuf))
3195 { /* If we're not actually changing the buffer, don't reset hscroll and 3188 { /* If we're not actually changing the buffer, don't reset hscroll and
3196 vscroll. This case happens for example when called from 3189 vscroll. This case happens for example when called from
@@ -3959,7 +3952,7 @@ set correctly. See the code of `split-window' for how this is done. */)
3959 wset_next (o, new); 3952 wset_next (o, new);
3960 } 3953 }
3961 3954
3962 wset_window_end_valid (n, Qnil); 3955 n->window_end_valid = 0;
3963 memset (&n->last_cursor, 0, sizeof n->last_cursor); 3956 memset (&n->last_cursor, 0, sizeof n->last_cursor);
3964 3957
3965 /* Get special geometry settings from reference window. */ 3958 /* Get special geometry settings from reference window. */
@@ -5372,7 +5365,7 @@ and redisplay normally--don't erase and redraw the frame. */)
5372 5365
5373 /* Set the new window start. */ 5366 /* Set the new window start. */
5374 set_marker_both (w->start, w->buffer, charpos, bytepos); 5367 set_marker_both (w->start, w->buffer, charpos, bytepos);
5375 wset_window_end_valid (w, Qnil); 5368 w->window_end_valid = 0;
5376 5369
5377 w->optional_new_start = 1; 5370 w->optional_new_start = 1;
5378 5371
@@ -6323,7 +6316,7 @@ display marginal areas and the text area. */)
6323 adjust_window_margins (w); 6316 adjust_window_margins (w);
6324 6317
6325 clear_glyph_matrix (w->current_matrix); 6318 clear_glyph_matrix (w->current_matrix);
6326 wset_window_end_valid (w, Qnil); 6319 w->window_end_valid = 0;
6327 6320
6328 ++windows_or_buffers_changed; 6321 ++windows_or_buffers_changed;
6329 adjust_glyphs (XFRAME (WINDOW_FRAME (w))); 6322 adjust_glyphs (XFRAME (WINDOW_FRAME (w)));
@@ -6393,7 +6386,7 @@ Fourth parameter HORIZONTAL-TYPE is currently unused. */)
6393 adjust_window_margins (w); 6386 adjust_window_margins (w);
6394 6387
6395 clear_glyph_matrix (w->current_matrix); 6388 clear_glyph_matrix (w->current_matrix);
6396 wset_window_end_valid (w, Qnil); 6389 w->window_end_valid = 0;
6397 6390
6398 ++windows_or_buffers_changed; 6391 ++windows_or_buffers_changed;
6399 adjust_glyphs (XFRAME (WINDOW_FRAME (w))); 6392 adjust_glyphs (XFRAME (WINDOW_FRAME (w)));