aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuan Fu2022-12-24 18:45:36 -0800
committerYuan Fu2022-12-24 18:46:04 -0800
commita24e350170e84d564e510739c8ddf02a7b08f276 (patch)
tree541566868c7f01cbd695d15de2b5b41d34d0acc7
parentfbb4eb919b4c91dd8517a06934bf1f897eaa34bb (diff)
downloademacs-a24e350170e84d564e510739c8ddf02a7b08f276.tar.gz
emacs-a24e350170e84d564e510739c8ddf02a7b08f276.zip
Fix treesit--children-covering-range-recurse (bug#60301)
* lisp/treesit.el (treesit--children-covering-range-recurse): Always return a list of node.
-rw-r--r--lisp/treesit.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 09483acaa7d..0eacd4075f8 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -865,7 +865,7 @@ LIMIT is the recursion limit, which defaults to 100."
865 (push child result)) 865 (push child result))
866 (setq child (treesit-node-next-sibling child))) 866 (setq child (treesit-node-next-sibling child)))
867 ;; If NODE has no child, keep NODE. 867 ;; If NODE has no child, keep NODE.
868 (or result node))) 868 (or result (list node))))
869 869
870(defsubst treesit--node-length (node) 870(defsubst treesit--node-length (node)
871 "Return the length of the text of NODE." 871 "Return the length of the text of NODE."