[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 b7d6bb47ee5 3/5: ; * lisp/treesit.el (treesit-font-lock-fontify
From: |
Yuan Fu |
Subject: |
emacs-29 b7d6bb47ee5 3/5: ; * lisp/treesit.el (treesit-font-lock-fontify-region): Minor fix. |
Date: |
Thu, 19 Jan 2023 17:47:40 -0500 (EST) |
branch: emacs-29
commit b7d6bb47ee5f6a459a873c5053c2dde9df4f2e2f
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>
; * lisp/treesit.el (treesit-font-lock-fontify-region): Minor fix.
The check for treesit--font-lock-fast-mode is not really necessary,
but anyway.
---
lisp/treesit.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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."
(end-time (current-time)))
;; If for any query the query time is strangely long,
;; switch to fast mode (see comments above).
- (when (and (> (time-to-seconds
+ (when (and (null treesit--font-lock-fast-mode)
+ (> (time-to-seconds
(time-subtract end-time start-time))
0.01))
(if (> treesit--font-lock-fast-mode-grace-count 0)