Use treesit-node-match-p in treesit-parent-while
The previous commit should've done this, but I missed it. * lisp/treesit.el (treesit-parent-while): Use treesit-node-match-p.
This commit is contained in:
parent
10faaa3c91
commit
cebd26b2e1
1 changed files with 1 additions and 1 deletions
|
@ -366,7 +366,7 @@ returns nil.
|
|||
PRED can be a predicate function, a regexp matching node type,
|
||||
and more; see docstring of `treesit-thing-settings'."
|
||||
(let ((last nil))
|
||||
(while (and node (funcall pred node))
|
||||
(while (and node (treesit-node-match-p node pred))
|
||||
(setq last node
|
||||
node (treesit-node-parent node)))
|
||||
last))
|
||||
|
|
Loading…
Add table
Reference in a new issue