mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
fix(treesitter): return correct match table in iter_captures()
This commit is contained in:
committed by
Lewis Russell
parent
c4e1930851
commit
7d97150084
@@ -36,15 +36,19 @@ end
|
||||
--- @generic F: function
|
||||
--- @param hash integer|string|fun(...): any
|
||||
--- @param fn F
|
||||
--- @param strong? boolean
|
||||
--- @return F
|
||||
return function(hash, fn)
|
||||
return function(hash, fn, strong)
|
||||
vim.validate({
|
||||
hash = { hash, { 'number', 'string', 'function' } },
|
||||
fn = { fn, 'function' },
|
||||
})
|
||||
|
||||
---@type table<any,table<any,any>>
|
||||
local cache = setmetatable({}, { __mode = 'kv' })
|
||||
local cache = {}
|
||||
if not strong then
|
||||
setmetatable(cache, { __mode = 'kv' })
|
||||
end
|
||||
|
||||
hash = resolve_hash(hash)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user