diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-06-11 15:29:11 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-06-11 15:29:11 +0800 |
commit | d93c5645334b392284a7a171e66d1b82a997a841 (patch) | |
tree | 3f6e184c6b947b785af6da29338bb3273be45052 /script/core | |
parent | e6f1dd06dbe5c70a8f8b239b73bb3e4a8caf7554 (diff) | |
download | lua-language-server-d93c5645334b392284a7a171e66d1b82a997a841.zip |
docs cache
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/searcher.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/script/core/searcher.lua b/script/core/searcher.lua index 095ff782..f1dd9508 100644 --- a/script/core/searcher.lua +++ b/script/core/searcher.lua @@ -6,6 +6,7 @@ local ws = require 'workspace' local vm = require 'vm.vm' local await = require 'await' local globals = require 'vm.globals' +local docs = require 'vm.docs' local NONE = {'NONE'} local LAST = {'LAST'} @@ -446,8 +447,12 @@ function m.searchRefsByID(status, uri, expect, mode) return end status.crossed[firstID] = true + local uris = docs.getUrisByID(firstID) + if not uris then + return + end local tid = id .. (field or '') - for guri in files.eachFile() do + for guri in pairs(uris) do if not files.eq(uri, guri) then crossSearch(status, guri, tid, mode) end |