From: Eli Zaretskii Date: Tue, 14 Jun 2022 17:27:12 +0000 (+0300) Subject: Handle W = NULL in 'update_redisplay_ticks' X-Git-Tag: emacs-29.0.90~1447^2~1506^2~8 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=264472a507ea275476eef5a80ee630aa007434f1;p=emacs.git Handle W = NULL in 'update_redisplay_ticks' * src/xdisp.c (update_redisplay_ticks): If W == NULL, assume we are iterating the current buffer. --- 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) means to initialize the tick count to zero. W can be NULL if TICKS is zero: that means unconditionally - re-initialize the current tick count to zero. */ + re-initialize the current tick count to zero. + + W can also be NULL if the caller doesn't know which window is being + processed by the display code. In that case, if TICKS is non-zero, + we assume it's the last window that shows the current buffer. */ void update_redisplay_ticks (int ticks, struct window *w) { @@ -17204,9 +17208,11 @@ update_redisplay_ticks (int ticks, struct window *w) the one used for the native tool bar). */ Lisp_Object contents = w ? w->contents : Qnil; char *bufname = - BUFFERP (contents) - ? SSDATA (BVAR (XBUFFER (contents), name)) - : (char *) ""; + NILP (contents) + ? SSDATA (BVAR (current_buffer, name)) + : (BUFFERP (contents) + ? SSDATA (BVAR (XBUFFER (contents), name)) + : (char *) ""); windows_or_buffers_changed = 177; error ("Window showing buffer %s takes too long to redisplay", bufname);