Fix tree-sitter indentation conflict with multiple languages

* lisp/treesit.el (treesit--indent-1): Use bol instead of point.

Copyright-paperwork-exempt: yes
This commit is contained in:
Augustin Chéneau 2023-09-20 12:23:22 +02:00 committed by Yuan Fu
parent bee18e5273
commit 7447d3df94
No known key found for this signature in database
GPG key ID: 56E19BC57664A442

View file

@ -1486,8 +1486,8 @@ Return (ANCHOR . OFFSET). This function is used by
(cond ((null (treesit-parser-list)) nil)
((eq 1 (length (treesit-parser-list)))
(treesit-node-at bol))
((treesit-language-at (point))
(treesit-node-at bol (treesit-language-at (point))))
((treesit-language-at bol)
(treesit-node-at bol (treesit-language-at bol)))
(t (treesit-node-at bol))))
(root (treesit-parser-root-node
(treesit-node-parser smallest-node)))