From: Eli Zaretskii Date: Tue, 14 Jun 2022 19:13:49 +0000 (+0300) Subject: Support callers which sometimes run unrelated to display code X-Git-Tag: emacs-29.0.90~1447^2~1506^2~7 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=94e118536986207ae17535c3d130b4172e408b7c;p=emacs.git Support callers which sometimes run unrelated to display code * src/xdisp.c (update_redisplay_ticks): Don't abort callers with w == NULL if we are called outside of display engine code, and don't update the tick count in that case. --- diff --git a/src/xdisp.c b/src/xdisp.c index d14955af415..1ba9132e8c0 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -17199,6 +17199,11 @@ update_redisplay_ticks (int ticks, struct window *w) cwindow = w; window_ticks = 0; } + /* Some callers can be run in contexts unrelated to redisplay, so + don't abort them and don't update the tick count in those cases. */ + if (!w && !redisplaying_p) + return; + if (ticks > 0) window_ticks += ticks; if (max_redisplay_ticks > 0 && window_ticks > max_redisplay_ticks)