diff options
author | Yuan Fu <casouri@gmail.com> | 2022-11-20 20:29:53 -0800 |
---|---|---|
committer | Yuan Fu <casouri@gmail.com> | 2022-11-21 01:29:31 -0800 |
commit | 938e68bb280c96eaf163bd932ab2582fbe27e780 (patch) | |
tree | 796388ce80fd7e71cd0ecbad041c8ac346c03295 /lisp/textmodes | |
parent | 3069849bd4c1048a8f8c0467d26560fad939e791 (diff) | |
download | emacs-938e68bb280c96eaf163bd932ab2582fbe27e780.tar.gz emacs-938e68bb280c96eaf163bd932ab2582fbe27e780.tar.bz2 emacs-938e68bb280c96eaf163bd932ab2582fbe27e780.zip |
Fix tree-sitter fontification heuristic
Previously applied heuristic 2 sometimes invalidates heuristic 1, add
a guard so it doesn't.
The new function is just for clearity of the code and has nothing to
do with the change itself.
* lisp/treesit.el (treesit--node-length): New function
(treesit-font-lock-fontify-region): Use the new function. Only do
heuristic 2 when the node is large.
Diffstat (limited to 'lisp/textmodes')
0 files changed, 0 insertions, 0 deletions