aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2022-06-14 20:27:12 +0300
committerEli Zaretskii2022-06-14 20:27:12 +0300
commit264472a507ea275476eef5a80ee630aa007434f1 (patch)
tree6cc0452b1ccb40a9d832e0a2ad5b5e41100b3be8 /src
parentbd44f39d6d4900e406f87d6f4df1ee015dd21300 (diff)
downloademacs-264472a507ea275476eef5a80ee630aa007434f1.tar.gz
emacs-264472a507ea275476eef5a80ee630aa007434f1.zip
Handle W = NULL in 'update_redisplay_ticks'
* src/xdisp.c (update_redisplay_ticks): If W == NULL, assume we are iterating the current buffer.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index ae428f4b404..d14955af415 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -17179,7 +17179,11 @@ redisplay_window_1 (Lisp_Object window)
17179 means to initialize the tick count to zero. 17179 means to initialize the tick count to zero.
17180 17180
17181 W can be NULL if TICKS is zero: that means unconditionally 17181 W can be NULL if TICKS is zero: that means unconditionally
17182 re-initialize the current tick count to zero. */ 17182 re-initialize the current tick count to zero.
17183
17184 W can also be NULL if the caller doesn't know which window is being
17185 processed by the display code. In that case, if TICKS is non-zero,
17186 we assume it's the last window that shows the current buffer. */
17183void 17187void
17184update_redisplay_ticks (int ticks, struct window *w) 17188update_redisplay_ticks (int ticks, struct window *w)
17185{ 17189{
@@ -17204,9 +17208,11 @@ update_redisplay_ticks (int ticks, struct window *w)
17204 the one used for the native tool bar). */ 17208 the one used for the native tool bar). */
17205 Lisp_Object contents = w ? w->contents : Qnil; 17209 Lisp_Object contents = w ? w->contents : Qnil;
17206 char *bufname = 17210 char *bufname =
17207 BUFFERP (contents) 17211 NILP (contents)
17208 ? SSDATA (BVAR (XBUFFER (contents), name)) 17212 ? SSDATA (BVAR (current_buffer, name))
17209 : (char *) "<none>"; 17213 : (BUFFERP (contents)
17214 ? SSDATA (BVAR (XBUFFER (contents), name))
17215 : (char *) "<unknown>");
17210 17216
17211 windows_or_buffers_changed = 177; 17217 windows_or_buffers_changed = 177;
17212 error ("Window showing buffer %s takes too long to redisplay", bufname); 17218 error ("Window showing buffer %s takes too long to redisplay", bufname);