]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix tree-sitter indentation conflict with multiple languages
authorAugustin Chéneau <btuin@mailo.com>
Wed, 20 Sep 2023 10:23:22 +0000 (12:23 +0200)
committerYuan Fu <casouri@gmail.com>
Sun, 24 Sep 2023 21:06:53 +0000 (14:06 -0700)
* lisp/treesit.el (treesit--indent-1): Use bol instead of point.

Copyright-paperwork-exempt: yes

lisp/treesit.el

index 8163ffdf32909ec555455f725f65e272dacc2584..c24ea90bba0ebb57636837735f71379703b96324 100644 (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)))