summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script/core/searcher.lua12
-rw-r--r--test/completion/init.lua2
-rw-r--r--test/crossfile/completion.lua1
3 files changed, 7 insertions, 8 deletions
diff --git a/script/core/searcher.lua b/script/core/searcher.lua
index 8e4873aa..68852062 100644
--- a/script/core/searcher.lua
+++ b/script/core/searcher.lua
@@ -820,7 +820,7 @@ function m.searchRefsByID(status, suri, expect, mode)
or mode == 'alldef'
or field
or hasCall(field) then
- for _, guri in ceach(uri, 'def:' .. id) do
+ for _, guri in ceach(suri, 'def:' .. id) do
if uri == guri then
goto CONTINUE
end
@@ -829,14 +829,14 @@ function m.searchRefsByID(status, suri, expect, mode)
end
elseif mode == 'field'
or mode == 'allfield' then
- for _, guri in ceach(uri, 'def:' .. id) do
+ for _, guri in ceach(suri, 'def:' .. id) do
if uri == guri then
goto CONTINUE
end
searchID(guri, id, field, uri)
::CONTINUE::
end
- for _, guri in ceach(uri, 'field:' .. id) do
+ for _, guri in ceach(suri, 'field:' .. id) do
if uri == guri then
goto CONTINUE
end
@@ -844,7 +844,7 @@ function m.searchRefsByID(status, suri, expect, mode)
::CONTINUE::
end
else
- for _, guri in ceach(uri, id) do
+ for _, guri in ceach(suri, id) do
if crossed[guri] then
goto CONTINUE
end
@@ -872,7 +872,7 @@ function m.searchRefsByID(status, suri, expect, mode)
or ignoredIDs[id]
or id == 'dn:string'
or hasCall(field) then
- for _, guri in ceach(uri, 'def:' .. id) do
+ for _, guri in ceach(suri, 'def:' .. id) do
if uri == guri then
goto CONTINUE
end
@@ -880,7 +880,7 @@ function m.searchRefsByID(status, suri, expect, mode)
::CONTINUE::
end
else
- for _, guri in ceach(uri, id) do
+ for _, guri in ceach(suri, id) do
if crossed[guri] then
goto CONTINUE
end
diff --git a/test/completion/init.lua b/test/completion/init.lua
index 1c485f63..89325883 100644
--- a/test/completion/init.lua
+++ b/test/completion/init.lua
@@ -76,7 +76,6 @@ function TEST(script)
local triggerCharacter = script:sub(inputPos, inputPos)
local result = core.completion('', inputPos, triggerCharacter)
- files.remove('')
if not expect then
assert(result == nil)
return
@@ -116,6 +115,7 @@ function TEST(script)
else
assert(eq(expect, result))
end
+ files.remove('')
end
end
diff --git a/test/crossfile/completion.lua b/test/crossfile/completion.lua
index d286a24d..9926e342 100644
--- a/test/crossfile/completion.lua
+++ b/test/crossfile/completion.lua
@@ -103,7 +103,6 @@ function TEST(data)
end
local expect = data.completion
- core.clearCache()
local result = core.completion(mainUri, pos, '')
if not expect then
assert(result == nil)