]> git.eshelyaron.com Git - emacs.git/commitdiff
Change tree-sitter indent preset 'match' to count on all nodes
authorYuan Fu <casouri@gmail.com>
Sat, 19 Nov 2022 23:25:06 +0000 (15:25 -0800)
committerYuan Fu <casouri@gmail.com>
Sat, 19 Nov 2022 23:25:06 +0000 (15:25 -0800)
I changed other presets to count all nodes a while ago, but forgot to
change 'match' too.

* lisp/treesit.el (treesit-simple-indent-presets): Change to count on
both named and anonymous nodes.

lisp/treesit.el

index 0bbed881b51cc0df806342969c22329747a8fa34..2ee977152240e554830fdab9a95c83465ca028a0 100644 (file)
@@ -902,10 +902,10 @@ See `treesit-simple-indent-presets'.")
                             node-field
                             (or (treesit-node-field-name node) "")))
                        (or (null node-index-min)
-                           (>= (treesit-node-index node t)
+                           (>= (treesit-node-index node)
                                node-index-min))
                        (or (null node-index-max)
-                           (<= (treesit-node-index node t)
+                           (<= (treesit-node-index node)
                                node-index-max))))))
         ;; TODO: Document if genuinely useful.
         (cons 'n-p-gp