emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115377: * src/window.c (window_scroll): Mark window


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r115377: * src/window.c (window_scroll): Mark window for redisplay.
Date: Wed, 04 Dec 2013 18:46:56 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115377
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16034
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2013-12-04 13:46:47 -0500
message:
  * src/window.c (window_scroll): Mark window for redisplay.
  (scroll_command, Fscroll_other_window): Don't cause redisplay now that
  window_scroll takes care of it.
  (Fset_window_point, Fdelete_other_windows_internal)
  (set_window_buffer, Fwindow_resize_apply, resize_frame_windows)
  (Fsplit_window_internal, Fdelete_window_internal)
  (Fresize_mini_window_internal, Fset_window_configuration)
  (apply_window_adjustment): Use fset_redisplay and wset_redisplay to
  cause redisplay instead of forcing a complete redisplay.
  * src/xdisp.c (wset_redisplay): Don't set windows_or_buffers_changed if
  we're only affecting the selected_window.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/window.c                   window.c-20091113204419-o5vbwnq5f7feedwu-231
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-12-04 16:58:05 +0000
+++ b/src/ChangeLog     2013-12-04 18:46:47 +0000
@@ -1,3 +1,17 @@
+2013-12-04  Stefan Monnier  <address@hidden>
+
+       * window.c (window_scroll): Mark window for redisplay (bug#16034).
+       (scroll_command, Fscroll_other_window): Don't cause redisplay now that
+       window_scroll takes care of it.
+       (Fset_window_point, Fdelete_other_windows_internal)
+       (set_window_buffer, Fwindow_resize_apply, resize_frame_windows)
+       (Fsplit_window_internal, Fdelete_window_internal)
+       (Fresize_mini_window_internal, Fset_window_configuration)
+       (apply_window_adjustment): Use fset_redisplay and wset_redisplay to
+       cause redisplay instead of forcing a complete redisplay.
+       * xdisp.c (wset_redisplay): Don't set windows_or_buffers_changed if
+       we're only affecting the selected_window.
+
 2013-12-04  Eli Zaretskii  <address@hidden>
 
        * bidi.c (bidi_get_type, bidi_get_category): Handle the isolate

=== modified file 'src/window.c'
--- a/src/window.c      2013-12-03 21:37:41 +0000
+++ b/src/window.c      2013-12-04 18:46:47 +0000
@@ -1683,7 +1683,7 @@
       set_marker_restricted (w->pointm, pos, w->contents);
       /* We have to make sure that redisplay updates the window to show
         the new value of point.  */
-      windows_or_buffers_changed = 25;
+      wset_redisplay (w);
     }
 
   return pos;
@@ -1706,8 +1706,7 @@
   w->update_mode_line = 1;
   /* Bug#15957.  */
   w->window_end_valid = 0;
-  if (w != XWINDOW (selected_window))
-    wset_redisplay (w);
+  wset_redisplay (w);
 
   return pos;
 }
@@ -2979,7 +2978,7 @@
     }
   free_window_matrices (r);
 
-  windows_or_buffers_changed = 27;
+  fset_redisplay (f);
   Vwindow_list = Qnil;
   FRAME_WINDOW_SIZES_CHANGED (f) = 1;
   resize_failed = 0;
@@ -3364,7 +3363,7 @@
     }
   /* Maybe we could move this into the `if' but it's not obviously safe and
      I doubt it's worth the trouble.  */
-  windows_or_buffers_changed = 28;
+  wset_redisplay (w);
 
   /* We must select BUFFER for running the window-scroll-functions.  */
   /* We can't check ! NILP (Vwindow_scroll_functions) here
@@ -3970,7 +3969,7 @@
   block_input ();
   window_resize_apply (r, horflag);
 
-  windows_or_buffers_changed = 30;
+  fset_redisplay (f);
   FRAME_WINDOW_SIZES_CHANGED (f) = 1;
 
   adjust_frame_glyphs (f);
@@ -4148,7 +4147,7 @@
        }
     }
 
-  windows_or_buffers_changed = 31;
+  fset_redisplay (f);
 }
 
 
@@ -4250,7 +4249,7 @@
        error ("Sum of sizes of old and new window don't fit");
     }
 
-  /* This is our point of no return. */
+  /* This is our point of no return.  */
   if (combination_limit)
     {
       /* Save the old value of o->normal_cols/lines.  It gets corrupted
@@ -4275,7 +4274,7 @@
   else
     p = XWINDOW (o->parent);
 
-  windows_or_buffers_changed = 32;
+  fset_redisplay (f);
   FRAME_WINDOW_SIZES_CHANGED (f) = 1;
   new = make_window ();
   n = XWINDOW (new);
@@ -4439,7 +4438,7 @@
            hlinfo->mouse_face_window = Qnil;
        }
 
-      windows_or_buffers_changed = 33;
+      fset_redisplay (f);
       Vwindow_list = Qnil;
       FRAME_WINDOW_SIZES_CHANGED (f) = 1;
 
@@ -4662,7 +4661,7 @@
       w->pixel_height = XFASTINT (w->new_pixel);
       w->pixel_top = r->pixel_top + r->pixel_height;
 
-      windows_or_buffers_changed = 36;
+      fset_redisplay (f);
       FRAME_WINDOW_SIZES_CHANGED (f) = 1;
       adjust_frame_glyphs (f);
       unblock_input ();
@@ -4732,6 +4731,8 @@
   immediate_quit = 1;
   n = clip_to_bounds (INT_MIN, n, INT_MAX);
 
+  wset_redisplay (XWINDOW (window));
+
   /* If we must, use the pixel-based version which is much slower than
      the line-based one but can handle varying line heights.  */
   if (FRAME_WINDOW_P (XFRAME (XWINDOW (window)->frame)))
@@ -5283,9 +5284,6 @@
     {
       record_unwind_protect (save_excursion_restore, save_excursion_save ());
       Fset_buffer (XWINDOW (selected_window)->contents);
-
-      /* Make redisplay consider other windows than just selected_window.  */
-      windows_or_buffers_changed = 37;
     }
 
   if (NILP (n))
@@ -5395,7 +5393,6 @@
 
   /* Don't screw up if window_scroll gets an error.  */
   record_unwind_protect (save_excursion_restore, save_excursion_save ());
-  windows_or_buffers_changed = 38;
 
   Fset_buffer (w->contents);
   SET_PT_BOTH (marker_position (w->pointm), marker_byte_position (w->pointm));
@@ -6052,7 +6049,7 @@
                           BUF_PT_BYTE (XBUFFER (w->contents)));
        }
 
-      windows_or_buffers_changed = 39;
+      fset_redisplay (f);
       FRAME_WINDOW_SIZES_CHANGED (f) = 1;
 
       /* Problem: Freeing all matrices and later allocating them again
@@ -6597,7 +6594,7 @@
   adjust_window_margins (w);
   clear_glyph_matrix (w->current_matrix);
   w->window_end_valid = 0;
-  windows_or_buffers_changed = 40;
+  wset_redisplay (w);
   adjust_frame_glyphs (XFRAME (WINDOW_FRAME (w)));
 }
 

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2013-12-03 02:27:10 +0000
+++ b/src/xdisp.c       2013-12-04 18:46:47 +0000
@@ -620,7 +620,9 @@
 void
 wset_redisplay (struct window *w)
 {
-  redisplay_other_windows ();
+  /* Beware: selected_window can be nil during early stages.  */
+  if (!EQ (make_lisp_ptr (w, Lisp_Vectorlike), selected_window))
+    redisplay_other_windows ();
   w->redisplay = true;
 }
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]