From: Eli Zaretskii Date: Sat, 18 Jun 2022 10:12:21 +0000 (+0300) Subject: Don't count ticks too eagerly in syntax.c X-Git-Tag: emacs-29.0.90~1447^2~1506^2~4 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a82af5ae786073aa3e7af82f3d181e8b18fdd594;p=emacs.git Don't count ticks too eagerly in syntax.c * src/syntax.c (scan_sexps_forward): Don't increment redisplay tick count of the loop didn't advance at all. --- diff --git a/src/syntax.c b/src/syntax.c index de9193e2deb..c13a8179ee4 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -3481,7 +3481,8 @@ do { prev_from = from; \ means we consider 10 buffer positions examined by this function roughly equivalent to the display engine iterating over a single buffer position. */ - update_redisplay_ticks ((from - started_from) / 10 + 1, NULL); + if (from > started_from) + update_redisplay_ticks ((from - started_from) / 10 + 1, NULL); } /* Convert a (lisp) parse state to the internal form used in