diff options
author | Eli Zaretskii <eliz@gnu.org> | 2022-06-14 22:13:49 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2022-06-14 22:13:49 +0300 |
commit | 94e118536986207ae17535c3d130b4172e408b7c (patch) | |
tree | 11b11552912d56f905bc6ef3d2160477d4442f0a | |
parent | 264472a507ea275476eef5a80ee630aa007434f1 (diff) | |
download | emacs-94e118536986207ae17535c3d130b4172e408b7c.tar.gz emacs-94e118536986207ae17535c3d130b4172e408b7c.tar.bz2 emacs-94e118536986207ae17535c3d130b4172e408b7c.zip |
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.
-rw-r--r-- | src/xdisp.c | 5 |
1 files changed, 5 insertions, 0 deletions
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) |