]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix parent-bol preset for tree-sitter indent
authorYuan Fu <casouri@gmail.com>
Sat, 29 Oct 2022 20:05:52 +0000 (13:05 -0700)
committerYuan Fu <casouri@gmail.com>
Sat, 29 Oct 2022 20:05:52 +0000 (13:05 -0700)
* lisp/treesit.el (treesit-simple-indent-presets): Return point rather
than column.

lisp/treesit.el

index 90e5d09693f85ebd82e07b91db20316da373c07b..6176fb57ef6e42c0a823dc2fac9f69a56be508e9 100644 (file)
@@ -783,7 +783,8 @@ See `treesit-simple-indent-presets'.")
                     (lambda (_n parent &rest _)
                       (save-excursion
                         (goto-char (treesit-node-start parent))
-                        (current-indentation)))))
+                        (back-to-indentation)
+                        (point)))))
     (prev-sibling . ,(byte-compile
                       (lambda (node &rest _)
                         (treesit-node-start