diff options
author | Yuan Fu <casouri@gmail.com> | 2023-01-17 22:26:21 -0800 |
---|---|---|
committer | Yuan Fu <casouri@gmail.com> | 2023-01-17 22:32:40 -0800 |
commit | ac3bc775b6fd934c972d9e2542f384cdc92d2754 (patch) | |
tree | d2128da0eb9661b84f7be627e44bd6e6a1dff2ea /test/lisp/progmodes/ruby-mode-resources/ruby-after-operator-indent.rb | |
parent | bdd82fa7977570160523cdce907f1b5d2c786359 (diff) | |
download | emacs-ac3bc775b6fd934c972d9e2542f384cdc92d2754.tar.gz emacs-ac3bc775b6fd934c972d9e2542f384cdc92d2754.tar.bz2 emacs-ac3bc775b6fd934c972d9e2542f384cdc92d2754.zip |
Make it harder to misactivate tree-sitter font-lock fast mode
This has been brought up in bug#60691 and bug#60223. I proposed a fix
by testing the size of the tree rather than measuring the query time.
But after some thought, I fear that just looking at the size will give
us false-negatives. So I kept the time-based activation, just added a
grace count to reduce false-positives.
* lisp/treesit.el:
(treesit--font-lock-fast-mode-grace-count): New variable.
(treesit--font-lock-notifier): Only activate fast mode after 5
offenses.
Diffstat (limited to 'test/lisp/progmodes/ruby-mode-resources/ruby-after-operator-indent.rb')
0 files changed, 0 insertions, 0 deletions