From a82af5ae786073aa3e7af82f3d181e8b18fdd594 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 18 Jun 2022 13:12:21 +0300 Subject: [PATCH] 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. --- src/syntax.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.2