diff options
author | Yuan Fu <casouri@gmail.com> | 2022-11-25 14:24:27 -0800 |
---|---|---|
committer | Yuan Fu <casouri@gmail.com> | 2022-11-25 19:00:22 -0800 |
commit | 73c94d5a9f00a98944516d86e4efcf50e20b2d48 (patch) | |
tree | 0e396e85868b032808bab5fea9bbbab6d82136f5 /lisp/treesit.el | |
parent | e9f86182cebc6ae156289829594de1454eb9122a (diff) | |
download | emacs-73c94d5a9f00a98944516d86e4efcf50e20b2d48.tar.gz emacs-73c94d5a9f00a98944516d86e4efcf50e20b2d48.tar.bz2 emacs-73c94d5a9f00a98944516d86e4efcf50e20b2d48.zip |
; Fix comment-end in treesit-simple-indent-presets
* lisp/treesit.el (treesit-simple-indent-presets): Fix comment-end.
Diffstat (limited to 'lisp/treesit.el')
-rw-r--r-- | lisp/treesit.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/treesit.el b/lisp/treesit.el index 8a8f6f02c79..b7da38becc1 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -1053,8 +1053,10 @@ See `treesit-simple-indent-presets'.") (lambda (node &rest _) (string-match-p name (or (treesit-node-field-name node) ""))))) - (cons 'comment-end (lambda (&rest _) - (looking-at-p treesit-comment-end))) + (cons 'comment-end (lambda (_node _parent bol &rest _) + (save-excursion + (goto-char bol) + (looking-at-p treesit-comment-end)))) ;; TODO: Document. (cons 'catch-all (lambda (&rest _) t)) |