diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-30 16:44:03 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-30 16:44:03 +0800 |
commit | 8c2598289dcbb1e4907319c3ff1dc5570c3d8167 (patch) | |
tree | 8c5f028a18516440f3d2a1adce95efbe06e8de2f /script/core | |
parent | d8d82910565406fe86651e498a37aa45e663976a (diff) | |
download | lua-language-server-8c2598289dcbb1e4907319c3ff1dc5570c3d8167.zip |
fix
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/searcher.lua | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/script/core/searcher.lua b/script/core/searcher.lua index 0d59f494..7e8d47b1 100644 --- a/script/core/searcher.lua +++ b/script/core/searcher.lua @@ -936,18 +936,12 @@ local function searchAllGlobalByUri(status, mode, uri, fullID) noder.compileNodes(root) local noders = noder.getNoders(root) if fullID then - for id, node in pairs(noders) do - if node.source - and id == fullID then - for source in noder.eachSource(noders, id) do - m.pushResult(status, mode, source) - end - end + for source in noder.eachSource(noders, fullID) do + m.pushResult(status, mode, source) end else - for id, node in pairs(noders) do - if node.source - and ssub(id, 1, 2) == 'g:' + for id in pairs(noders.source) do + if ssub(id, 1, 2) == 'g:' and not sfind(id, noder.SPLIT_CHAR) then for source in noder.eachSource(noders, id) do m.pushResult(status, mode, source) |