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