diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/query_predicates.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/query_predicates.lua b/lua/nvim-treesitter/query_predicates.lua index 2a3b4c38d..20cb42743 100644 --- a/lua/nvim-treesitter/query_predicates.lua +++ b/lua/nvim-treesitter/query_predicates.lua @@ -26,7 +26,7 @@ query.add_predicate("nth?", function(match, pattern, bufnr, pred) end local node = match[pred[2]] - local n = pred[3] + local n = tonumber(pred[3]) if node and node:parent() and node:parent():named_child_count() > n then return node:parent():named_child(n) == node end |
