aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuan Fu2023-01-19 11:53:14 -0800
committerYuan Fu2023-01-19 14:47:25 -0800
commitb7d6bb47ee5f6a459a873c5053c2dde9df4f2e2f (patch)
tree076f186bb450a8c52a80e579641622b508950fc4
parent0c6bfeddb21df16a6001328882fe2aaf6b063f68 (diff)
downloademacs-b7d6bb47ee5f6a459a873c5053c2dde9df4f2e2f.tar.gz
emacs-b7d6bb47ee5f6a459a873c5053c2dde9df4f2e2f.zip
; * lisp/treesit.el (treesit-font-lock-fontify-region): Minor fix.
The check for treesit--font-lock-fast-mode is not really necessary, but anyway.
-rw-r--r--lisp/treesit.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 7669ed6d18c..5a65d565236 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -987,7 +987,8 @@ If LOUDLY is non-nil, display some debugging information."
987 (end-time (current-time))) 987 (end-time (current-time)))
988 ;; If for any query the query time is strangely long, 988 ;; If for any query the query time is strangely long,
989 ;; switch to fast mode (see comments above). 989 ;; switch to fast mode (see comments above).
990 (when (and (> (time-to-seconds 990 (when (and (null treesit--font-lock-fast-mode)
991 (> (time-to-seconds
991 (time-subtract end-time start-time)) 992 (time-subtract end-time start-time))
992 0.01)) 993 0.01))
993 (if (> treesit--font-lock-fast-mode-grace-count 0) 994 (if (> treesit--font-lock-fast-mode-grace-count 0)