aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorDmitry Antipov2013-08-08 08:42:40 +0400
committerDmitry Antipov2013-08-08 08:42:40 +0400
commit628fdc567a63c5cc6959ca5a4e09eb9b1d3e6092 (patch)
tree607fa20231b352548121bc23f852936885211cd7 /src/window.c
parentbd0c3c0b12b33988cf649f09d861b359387726cb (diff)
downloademacs-628fdc567a63c5cc6959ca5a4e09eb9b1d3e6092.tar.gz
emacs-628fdc567a63c5cc6959ca5a4e09eb9b1d3e6092.zip
Do not reset window modification event counters excessively.
These leftovers and poor man's tricky methods to catch extra redisplay's attention are no longer needed. * frame.c (set_menu_bar_lines_1): * minibuf.c (read_minibuf_unwind): * window.c (Fset_window_start, set_window_buffer, window_resize_apply) (grow_mini_window, shrink_mini_window, window_scroll_pixel_based) (window_scroll_line_based, Fset_window_configuration): * xdisp.c (redisplay_window): Do not reset last_modified and last_overlay_modified counters.
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/src/window.c b/src/window.c
index 118c5852275..8a514d64954 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1614,9 +1614,8 @@ overriding motion of point in order to display at this exact start. */)
1614 if (NILP (noforce)) 1614 if (NILP (noforce))
1615 w->force_start = 1; 1615 w->force_start = 1;
1616 w->update_mode_line = 1; 1616 w->update_mode_line = 1;
1617 w->last_modified = 0;
1618 w->last_overlay_modified = 0;
1619 if (!EQ (window, selected_window)) 1617 if (!EQ (window, selected_window))
1618 /* Enforce full redisplay. FIXME: make it more selective. */
1620 windows_or_buffers_changed++; 1619 windows_or_buffers_changed++;
1621 1620
1622 return pos; 1621 return pos;
@@ -3215,8 +3214,6 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer,
3215 buffer); 3214 buffer);
3216 w->start_at_line_beg = 0; 3215 w->start_at_line_beg = 0;
3217 w->force_start = 0; 3216 w->force_start = 0;
3218 w->last_modified = 0;
3219 w->last_overlay_modified = 0;
3220 } 3217 }
3221 /* Maybe we could move this into the `if' but it's not obviously safe and 3218 /* Maybe we could move this into the `if' but it's not obviously safe and
3222 I doubt it's worth the trouble. */ 3219 I doubt it's worth the trouble. */
@@ -3677,10 +3674,6 @@ window_resize_apply (struct window *w, bool horflag)
3677 c = NILP (c->next) ? 0 : XWINDOW (c->next); 3674 c = NILP (c->next) ? 0 : XWINDOW (c->next);
3678 } 3675 }
3679 } 3676 }
3680
3681 /* Clear out some redisplay caches. */
3682 w->last_modified = 0;
3683 w->last_overlay_modified = 0;
3684} 3677}
3685 3678
3686 3679
@@ -4199,9 +4192,7 @@ grow_mini_window (struct window *w, int delta)
4199 /* Grow the mini-window. */ 4192 /* Grow the mini-window. */
4200 w->top_line = r->top_line + r->total_lines; 4193 w->top_line = r->top_line + r->total_lines;
4201 w->total_lines -= XINT (value); 4194 w->total_lines -= XINT (value);
4202 w->last_modified = 0; 4195 /* Enforce full redisplay. FIXME: make it more selective. */
4203 w->last_overlay_modified = 0;
4204
4205 windows_or_buffers_changed++; 4196 windows_or_buffers_changed++;
4206 adjust_glyphs (f); 4197 adjust_glyphs (f);
4207 unblock_input (); 4198 unblock_input ();
@@ -4235,10 +4226,7 @@ shrink_mini_window (struct window *w)
4235 /* Shrink the mini-window. */ 4226 /* Shrink the mini-window. */
4236 w->top_line = r->top_line + r->total_lines; 4227 w->top_line = r->top_line + r->total_lines;
4237 w->total_lines = 1; 4228 w->total_lines = 1;
4238 4229 /* Enforce full redisplay. FIXME: make it more selective. */
4239 w->last_modified = 0;
4240 w->last_overlay_modified = 0;
4241
4242 windows_or_buffers_changed++; 4230 windows_or_buffers_changed++;
4243 adjust_glyphs (f); 4231 adjust_glyphs (f);
4244 unblock_input (); 4232 unblock_input ();
@@ -4464,8 +4452,6 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror)
4464 w->contents); 4452 w->contents);
4465 w->start_at_line_beg = 1; 4453 w->start_at_line_beg = 1;
4466 w->update_mode_line = 1; 4454 w->update_mode_line = 1;
4467 w->last_modified = 0;
4468 w->last_overlay_modified = 0;
4469 /* Set force_start so that redisplay_window will run the 4455 /* Set force_start so that redisplay_window will run the
4470 window-scroll-functions. */ 4456 window-scroll-functions. */
4471 w->force_start = 1; 4457 w->force_start = 1;
@@ -4610,8 +4596,6 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror)
4610 bytepos = marker_byte_position (w->start); 4596 bytepos = marker_byte_position (w->start);
4611 w->start_at_line_beg = (pos == BEGV || FETCH_BYTE (bytepos - 1) == '\n'); 4597 w->start_at_line_beg = (pos == BEGV || FETCH_BYTE (bytepos - 1) == '\n');
4612 w->update_mode_line = 1; 4598 w->update_mode_line = 1;
4613 w->last_modified = 0;
4614 w->last_overlay_modified = 0;
4615 /* Set force_start so that redisplay_window will run the 4599 /* Set force_start so that redisplay_window will run the
4616 window-scroll-functions. */ 4600 window-scroll-functions. */
4617 w->force_start = 1; 4601 w->force_start = 1;
@@ -4810,8 +4794,6 @@ window_scroll_line_based (Lisp_Object window, int n, bool whole, int noerror)
4810 set_marker_restricted_both (w->start, w->contents, pos, pos_byte); 4794 set_marker_restricted_both (w->start, w->contents, pos, pos_byte);
4811 w->start_at_line_beg = !NILP (bolp); 4795 w->start_at_line_beg = !NILP (bolp);
4812 w->update_mode_line = 1; 4796 w->update_mode_line = 1;
4813 w->last_modified = 0;
4814 w->last_overlay_modified = 0;
4815 /* Set force_start so that redisplay_window will run 4797 /* Set force_start so that redisplay_window will run
4816 the window-scroll-functions. */ 4798 the window-scroll-functions. */
4817 w->force_start = 1; 4799 w->force_start = 1;
@@ -5743,9 +5725,6 @@ the return value is nil. Otherwise the value is t. */)
5743 } 5725 }
5744 } 5726 }
5745 5727
5746 w->last_modified = 0;
5747 w->last_overlay_modified = 0;
5748
5749 if (BUFFERP (p->buffer) && BUFFER_LIVE_P (XBUFFER (p->buffer))) 5728 if (BUFFERP (p->buffer) && BUFFER_LIVE_P (XBUFFER (p->buffer)))
5750 /* If saved buffer is alive, install it. */ 5729 /* If saved buffer is alive, install it. */
5751 { 5730 {