* lisp/treesit.el (treesit-node-at): Add check for nil node.
This commit is contained in:
parent
d8c9b9c0fb
commit
750090fd07
1 changed files with 1 additions and 1 deletions
|
@ -143,7 +143,7 @@ that language in the current buffer, and use that."
|
|||
(treesit-parser-root-node parser-or-lang)
|
||||
(treesit-buffer-root-node parser-or-lang))))
|
||||
;; TODO: We might want a `treesit-node-decendant-for-pos' in C.
|
||||
(while (cond ((< (treesit-node-end node) point)
|
||||
(while (cond ((and node (< (treesit-node-end node) point))
|
||||
(setq node (treesit-node-next-sibling node))
|
||||
t)
|
||||
((treesit-node-child node 0 named)
|
||||
|
|
Loading…
Add table
Reference in a new issue