summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-06-15 17:24:30 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-06-15 17:24:30 +0800
commit3d0aca53a30fa55637234685e7825600f42e48c0 (patch)
treeb004ff3fc9d7704972f579851489bc39b82d5adb
parent04a894325b9750b5a37de7cfd23aad565aa2003b (diff)
downloadlua-language-server-3d0aca53a30fa55637234685e7825600f42e48c0.zip
cleanup
-rw-r--r--script/core/searcher.lua17
1 files changed, 10 insertions, 7 deletions
diff --git a/script/core/searcher.lua b/script/core/searcher.lua
index 2097c8fa..52b0b5ea 100644
--- a/script/core/searcher.lua
+++ b/script/core/searcher.lua
@@ -430,7 +430,9 @@ function m.searchRefsByID(status, uri, expect, mode)
if field or mode == 'field' then
searchID('dn:stringlib', field)
end
+ return true
end
+ return false
end
local function checkRequire(requireName, field)
@@ -509,15 +511,16 @@ function m.searchRefsByID(status, uri, expect, mode)
return true
end
- if node.forward then
- checkForward(id, node, field)
- end
- if node.backward then
- checkBackward(id, node, field)
+ local isSepcial = checkSpecial(id, node, field)
+ if not isSepcial then
+ if node.forward then
+ checkForward(id, node, field)
+ end
+ if node.backward then
+ checkBackward(id, node, field)
+ end
end
- checkSpecial(id, node, field)
-
if node.sources then
checkGeneric(node.sources[1], field)
checkENV(node.sources[1], field)