From 7447d3df94e49bef8577008d76a6b1f6a4013146 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Augustin=20Ch=C3=A9neau?= Date: Wed, 20 Sep 2023 12:23:22 +0200 Subject: [PATCH] Fix tree-sitter indentation conflict with multiple languages * lisp/treesit.el (treesit--indent-1): Use bol instead of point. Copyright-paperwork-exempt: yes --- lisp/treesit.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/treesit.el b/lisp/treesit.el index 8163ffdf329..c24ea90bba0 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -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))) -- 2.39.2