From a24e350170e84d564e510739c8ddf02a7b08f276 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Sat, 24 Dec 2022 18:45:36 -0800 Subject: [PATCH] Fix treesit--children-covering-range-recurse (bug#60301) * lisp/treesit.el (treesit--children-covering-range-recurse): Always return a list of node. --- lisp/treesit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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." (push child result)) (setq child (treesit-node-next-sibling child))) ;; If NODE has no child, keep NODE. - (or result node))) + (or result (list node)))) (defsubst treesit--node-length (node) "Return the length of the text of NODE." -- 2.39.2