emacs-diffs
[Top][All Lists]
Advanced

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

master f1e1392868 03/14: Change the API of 'update_redisplay_ticks'


From: Eli Zaretskii
Subject: master f1e1392868 03/14: Change the API of 'update_redisplay_ticks'
Date: Fri, 24 Jun 2022 03:54:18 -0400 (EDT)

branch: master
commit f1e1392868d282bf1ee7623fcdf3d094509ba8dd
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Change the API of 'update_redisplay_ticks'
    
    * src/xdisp.c (update_redisplay_ticks): Change the 2nd argument
    to be 'struct window'; all callers changed.
---
 src/dispextern.h |  2 +-
 src/xdisp.c      | 21 +++++++++------------
 2 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/src/dispextern.h b/src/dispextern.h
index a919f364c1..0ea3ac8b07 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -3505,7 +3505,7 @@ extern unsigned row_hash (struct glyph_row *);
 
 extern bool buffer_flipping_blocked_p (void);
 
-extern void update_redisplay_ticks (int, struct it *);
+extern void update_redisplay_ticks (int, struct window *);
 
 /* Defined in image.c */
 
diff --git a/src/xdisp.c b/src/xdisp.c
index 9eba0ca886..27041cb162 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -3222,7 +3222,7 @@ init_iterator (struct it *it, struct window *w,
 
   it->cmp_it.id = -1;
 
-  update_redisplay_ticks (0, it);
+  update_redisplay_ticks (0, w);
 
   /* Extra space between lines (on window systems only).  */
   if (base_face_id == DEFAULT_FACE_ID
@@ -8177,7 +8177,7 @@ void
 set_iterator_to_next (struct it *it, bool reseat_p)
 {
 
-  update_redisplay_ticks (1, it);
+  update_redisplay_ticks (1, it->w);
 
   switch (it->method)
     {
@@ -17171,17 +17171,14 @@ redisplay_window_1 (Lisp_Object window)
                      Aborting runaway redisplay
  ***********************************************************************/
 
-/* Update the redisplay-tick count for a window, and signal an error
+/* Update the redisplay-tick count for window W, and signal an error
    if the tick count is above some threshold, indicating that
    redisplay of the window takes "too long".
 
-   TICKS is the amount of ticks to add to the window's current count;
-   zero means to initialize the count to zero.
-
-   IT is the iterator used for redisplay work; it->w is the window we
-   are working on.  */
+   TICKS is the amount of ticks to add to the W's current count; zero
+   means to initialize the count to zero.  */
 void
-update_redisplay_ticks (int ticks, struct it *it)
+update_redisplay_ticks (int ticks, struct window *w)
 {
   /* This keeps track of the window on which redisplay is working.  */
   static struct window *cwindow;
@@ -17190,16 +17187,16 @@ update_redisplay_ticks (int ticks, struct it *it)
   /* We only initialize the count if this is a different window.
      Otherwise, this is a call from init_iterator for the same window
      we tracked before, and we should keep the count.  */
-  if (!ticks && it->w != cwindow)
+  if (!ticks && w != cwindow)
     {
-      cwindow = it->w;
+      cwindow = w;
       window_ticks = 0;
     }
   if (ticks > 0)
     window_ticks += ticks;
   if (max_redisplay_ticks > 0 && window_ticks > max_redisplay_ticks)
     error ("Window showing buffer %s takes too long to redisplay",
-          SSDATA (BVAR (XBUFFER (it->w->contents), name)));
+          SSDATA (BVAR (XBUFFER (w->contents), name)));
 }
 
 



reply via email to

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