summaryrefslogtreecommitdiff
path: root/src/syntax.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2022-06-18 13:12:21 +0300
committerEli Zaretskii <eliz@gnu.org>2022-06-18 13:12:21 +0300
commita82af5ae786073aa3e7af82f3d181e8b18fdd594 (patch)
tree7619dcc66bd9e623b1121401399b42bffcb23501 /src/syntax.c
parent82626e62ab27b498848e4c1822f6c4c06ad53947 (diff)
downloademacs-a82af5ae786073aa3e7af82f3d181e8b18fdd594.tar.gz
emacs-a82af5ae786073aa3e7af82f3d181e8b18fdd594.tar.bz2
emacs-a82af5ae786073aa3e7af82f3d181e8b18fdd594.zip
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.
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c3
1 files changed, 2 insertions, 1 deletions
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