summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorAugustin Chéneau <btuin@mailo.com>2023-09-20 12:23:22 +0200
committerYuan Fu <casouri@gmail.com>2023-09-24 14:06:53 -0700
commit7447d3df94e49bef8577008d76a6b1f6a4013146 (patch)
tree9ce740e16caef0bff0502db9f735219b9a5aa17b /lisp
parentbee18e527379d2474e7a4ca62c53b6f21d8f9315 (diff)
downloademacs-7447d3df94e49bef8577008d76a6b1f6a4013146.tar.gz
emacs-7447d3df94e49bef8577008d76a6b1f6a4013146.tar.bz2
emacs-7447d3df94e49bef8577008d76a6b1f6a4013146.zip
Fix tree-sitter indentation conflict with multiple languages
* lisp/treesit.el (treesit--indent-1): Use bol instead of point. Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp')
-rw-r--r--lisp/treesit.el4
1 files 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)))