diff options
| author | Volodymyr Chernetskyi <19735328+chernetskyi@users.noreply.github.com> | 2026-09-04 18:20:15 +0200 |
|---|---|---|
| committer | Christian Clason <ch.clason+github@icloud.com> | 2026-09-06 18:27:02 +0200 |
| commit | 2f5df7add78e254f672e23a6e13621817663fb6c (patch) | |
| tree | 1d99e0d83b66c18930b45ed31c67b49cf0f7dafc /runtime/lua/vim/_async.lua | |
| parent | e8a0b400d8d35d994d2b2ef639566f6d36ecc729 (diff) | |
| download | rneovim-2f5df7add78e254f672e23a6e13621817663fb6c.tar.gz rneovim-2f5df7add78e254f672e23a6e13621817663fb6c.tar.bz2 rneovim-2f5df7add78e254f672e23a6e13621817663fb6c.zip | |
fix(treesitter): #has-parent? errors on a node with no parent
Problem:
The #has-parent? predicate indexes the result of node:parent() without
checking it, so a capture that matches a tree's root node raises
query.lua:600: attempt to index a nil value
instead of simply not matching. In a highlights query that breaks
highlighting for the whole buffer. The sibling #has-ancestor? predicate
handles the same situation.
Solution:
Treat a missing parent as "does not match".
AI-assisted
Diffstat (limited to 'runtime/lua/vim/_async.lua')
0 files changed, 0 insertions, 0 deletions