Fix scopes comparator
This commit is contained in:
@@ -204,7 +204,7 @@ compare.scopes = setmetatable({
|
||||
for _, definition in pairs(definitions) do
|
||||
if s <= definition.node:start() and definition.node:end_() <= e then
|
||||
if scope:id() == locals.containing_scope(definition.node, buf):id() then
|
||||
local text = vim.treesitter.query.get_node_text(definition.node)[1]
|
||||
local text = vim.treesitter.query.get_node_text(definition.node, buf) or ''
|
||||
if not self.scopes_map[text] then
|
||||
self.scopes_map[text] = depth
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user