aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2002-03-18 04:43:36 +0000
committerRichard M. Stallman2002-03-18 04:43:36 +0000
commit5fb96e963b12e3ced5ee9a2ee5477679b540295a (patch)
treee2d4c650503af9cf5f25e22873c3635a2cd08550
parentd1a0ea0ae2b95dc0a7ebe89bda32dcb1c8ef9cdd (diff)
downloademacs-5fb96e963b12e3ced5ee9a2ee5477679b540295a.tar.gz
emacs-5fb96e963b12e3ced5ee9a2ee5477679b540295a.zip
(cursor_type_changed): New variable.
(redisplay_internal): Redisplay all windows if cursor_type_changed. Clear it when clearing windows_or_buffers_changed. (try_cursor_movement, redisplay_window, try_window_id) (try_window_reusing_current_matrix): Test cursor_type_changed along with windows_or_buffers_changed. (clear_garbaged_frames): Don't set windows_or_buffers_changed if no frames needed redrawing.
-rw-r--r--src/xdisp.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 80667951f91..5d3e89e9d23 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -455,6 +455,10 @@ int update_mode_lines;
455 455
456int windows_or_buffers_changed; 456int windows_or_buffers_changed;
457 457
458/* Nonzero means a frame's cursor type has been changed. */
459
460int cursor_type_changed;
461
458/* Nonzero after display_mode_line if %l was used and it displayed a 462/* Nonzero after display_mode_line if %l was used and it displayed a
459 line number. */ 463 line number. */
460 464
@@ -7022,6 +7026,7 @@ clear_garbaged_frames ()
7022 if (frame_garbaged) 7026 if (frame_garbaged)
7023 { 7027 {
7024 Lisp_Object tail, frame; 7028 Lisp_Object tail, frame;
7029 int changed_count = 0;
7025 7030
7026 FOR_EACH_FRAME (tail, frame) 7031 FOR_EACH_FRAME (tail, frame)
7027 { 7032 {
@@ -7032,13 +7037,15 @@ clear_garbaged_frames ()
7032 if (f->resized_p) 7037 if (f->resized_p)
7033 Fredraw_frame (frame); 7038 Fredraw_frame (frame);
7034 clear_current_matrices (f); 7039 clear_current_matrices (f);
7040 changed_count++;
7035 f->garbaged = 0; 7041 f->garbaged = 0;
7036 f->resized_p = 0; 7042 f->resized_p = 0;
7037 } 7043 }
7038 } 7044 }
7039 7045
7040 frame_garbaged = 0; 7046 frame_garbaged = 0;
7041 ++windows_or_buffers_changed; 7047 if (changed_count)
7048 ++windows_or_buffers_changed;
7042 } 7049 }
7043} 7050}
7044 7051
@@ -8575,7 +8582,8 @@ redisplay_internal (preserve_echo_area)
8575 /* The variable buffer_shared is set in redisplay_window and 8582 /* The variable buffer_shared is set in redisplay_window and
8576 indicates that we redisplay a buffer in different windows. See 8583 indicates that we redisplay a buffer in different windows. See
8577 there. */ 8584 there. */
8578 consider_all_windows_p = update_mode_lines || buffer_shared > 1; 8585 consider_all_windows_p = (update_mode_lines || buffer_shared > 1
8586 || cursor_type_changed);
8579 8587
8580 /* If specs for an arrow have changed, do thorough redisplay 8588 /* If specs for an arrow have changed, do thorough redisplay
8581 to ensure we remove any arrow that should no longer exist. */ 8589 to ensure we remove any arrow that should no longer exist. */
@@ -9052,6 +9060,7 @@ redisplay_internal (preserve_echo_area)
9052 9060
9053 update_mode_lines = 0; 9061 update_mode_lines = 0;
9054 windows_or_buffers_changed = 0; 9062 windows_or_buffers_changed = 0;
9063 cursor_type_changed = 0;
9055 } 9064 }
9056 9065
9057 /* Start SIGIO interrupts coming again. Having them off during the 9066 /* Start SIGIO interrupts coming again. Having them off during the
@@ -9860,6 +9869,7 @@ try_cursor_movement (window, startp, scroll_step)
9860 cases. */ 9869 cases. */
9861 && !update_mode_lines 9870 && !update_mode_lines
9862 && !windows_or_buffers_changed 9871 && !windows_or_buffers_changed
9872 && !cursor_type_changed
9863 /* Can't use this case if highlighting a region. When a 9873 /* Can't use this case if highlighting a region. When a
9864 region exists, cursor movement has to do more than just 9874 region exists, cursor movement has to do more than just
9865 set the cursor. */ 9875 set the cursor. */
@@ -10501,6 +10511,7 @@ redisplay_window (window, just_this_one_p)
10501 /* Redisplay the window. */ 10511 /* Redisplay the window. */
10502 if (!current_matrix_up_to_date_p 10512 if (!current_matrix_up_to_date_p
10503 || windows_or_buffers_changed 10513 || windows_or_buffers_changed
10514 || cursor_type_changed
10504 /* Don't use try_window_reusing_current_matrix in this case 10515 /* Don't use try_window_reusing_current_matrix in this case
10505 because it can have changed the buffer. */ 10516 because it can have changed the buffer. */
10506 || !NILP (Vwindow_scroll_functions) 10517 || !NILP (Vwindow_scroll_functions)
@@ -10793,7 +10804,8 @@ try_window_reusing_current_matrix (w)
10793 !FRAME_WINDOW_P (f) 10804 !FRAME_WINDOW_P (f)
10794 /* Don't try to reuse the display if windows have been split 10805 /* Don't try to reuse the display if windows have been split
10795 or such. */ 10806 or such. */
10796 || windows_or_buffers_changed) 10807 || windows_or_buffers_changed
10808 || cursor_type_changed)
10797 return 0; 10809 return 0;
10798 10810
10799 /* Can't do this if region may have changed. */ 10811 /* Can't do this if region may have changed. */
@@ -11465,7 +11477,7 @@ try_window_id (w)
11465 GIVE_UP (1); 11477 GIVE_UP (1);
11466 11478
11467 /* This flag is used to prevent redisplay optimizations. */ 11479 /* This flag is used to prevent redisplay optimizations. */
11468 if (windows_or_buffers_changed) 11480 if (windows_or_buffers_changed || cursor_type_changed)
11469 GIVE_UP (2); 11481 GIVE_UP (2);
11470 11482
11471 /* Verify that narrowing has not changed. This flag is also set to prevent 11483 /* Verify that narrowing has not changed. This flag is also set to prevent