]> git.eshelyaron.com Git - emacs.git/commitdiff
; * lisp/treesit.el (treesit-font-lock-fontify-region): Minor fix.
authorYuan Fu <casouri@gmail.com>
Thu, 19 Jan 2023 19:53:14 +0000 (11:53 -0800)
committerYuan Fu <casouri@gmail.com>
Thu, 19 Jan 2023 22:47:25 +0000 (14:47 -0800)
The check for treesit--font-lock-fast-mode is not really necessary,
but anyway.

lisp/treesit.el

index 7669ed6d18c096be9662b22c346f715e532dafcb..5a65d565236b8fd9ac7f9227275ba463eb3b7b15 100644 (file)
@@ -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)