aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog13
-rw-r--r--src/frame.c1
-rw-r--r--src/minibuf.c4
-rw-r--r--src/window.c27
-rw-r--r--src/xdisp.c5
5 files changed, 17 insertions, 33 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ead50fa0517..6cb69f776f1 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,16 @@
12013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2
3 Do not reset window modification event counters excessively.
4 These leftovers and poor man's tricky methods to catch extra
5 redisplay's attention are no longer needed.
6 * frame.c (set_menu_bar_lines_1):
7 * minibuf.c (read_minibuf_unwind):
8 * window.c (Fset_window_start, set_window_buffer, window_resize_apply)
9 (grow_mini_window, shrink_mini_window, window_scroll_pixel_based)
10 (window_scroll_line_based, Fset_window_configuration):
11 * xdisp.c (redisplay_window): Do not reset last_modified and
12 last_overlay_modified counters.
13
12013-08-07 Jan Djärv <jan.h.d@swipnet.se> 142013-08-07 Jan Djärv <jan.h.d@swipnet.se>
2 15
3 * xselect.c (x_send_client_event): Set send_event and serial, memset 16 * xselect.c (x_send_client_event): Set send_event and serial, memset
diff --git a/src/frame.c b/src/frame.c
index 813c97ffe3e..853ec441343 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -185,7 +185,6 @@ set_menu_bar_lines_1 (Lisp_Object window, int n)
185{ 185{
186 struct window *w = XWINDOW (window); 186 struct window *w = XWINDOW (window);
187 187
188 w->last_modified = 0;
189 w->top_line += n; 188 w->top_line += n;
190 w->total_lines -= n; 189 w->total_lines -= n;
191 190
diff --git a/src/minibuf.c b/src/minibuf.c
index b3648b8c1ae..7403fc6c32d 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -870,10 +870,8 @@ read_minibuf_unwind (void)
870 if (minibuf_level == 0) 870 if (minibuf_level == 0)
871 resize_mini_window (XWINDOW (window), 0); 871 resize_mini_window (XWINDOW (window), 0);
872 872
873 /* Make sure minibuffer window is erased, not ignored. */ 873 /* Enforce full redisplay. FIXME: make it more selective. */
874 windows_or_buffers_changed++; 874 windows_or_buffers_changed++;
875 XWINDOW (window)->last_modified = 0;
876 XWINDOW (window)->last_overlay_modified = 0;
877 875
878 /* In case the previous minibuffer displayed in this miniwindow is 876 /* In case the previous minibuffer displayed in this miniwindow is
879 dead, we may keep displaying this buffer (tho it's inactive), so reset it, 877 dead, we may keep displaying this buffer (tho it's inactive), so reset it,
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 {
diff --git a/src/xdisp.c b/src/xdisp.c
index 102eafbba49..d2dae3406d1 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -15555,8 +15555,6 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
15555 startp = run_window_scroll_functions (window, startp); 15555 startp = run_window_scroll_functions (window, startp);
15556 } 15556 }
15557 15557
15558 w->last_modified = 0;
15559 w->last_overlay_modified = 0;
15560 if (CHARPOS (startp) < BEGV) 15558 if (CHARPOS (startp) < BEGV)
15561 SET_TEXT_POS (startp, BEGV, BEGV_BYTE); 15559 SET_TEXT_POS (startp, BEGV, BEGV_BYTE);
15562 else if (CHARPOS (startp) > ZV) 15560 else if (CHARPOS (startp) > ZV)
@@ -15802,9 +15800,6 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
15802 15800
15803 try_to_scroll: 15801 try_to_scroll:
15804 15802
15805 w->last_modified = 0;
15806 w->last_overlay_modified = 0;
15807
15808 /* Redisplay the mode line. Select the buffer properly for that. */ 15803 /* Redisplay the mode line. Select the buffer properly for that. */
15809 if (!update_mode_line) 15804 if (!update_mode_line)
15810 { 15805 {