diff options
author | sumneko <sumneko@hotmail.com> | 2022-01-23 02:29:34 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2022-01-23 02:29:34 +0800 |
commit | fecdb2af1ceba45021486d1e28d8e11f490d2b36 (patch) | |
tree | ce8b09f67ecd34637987951a2111bca1e81d5dc7 /script/vm | |
parent | 2ee33dade7af1129ec792e69c51c993d853da54a (diff) | |
download | lua-language-server-fecdb2af1ceba45021486d1e28d8e11f490d2b36.zip |
fix
Diffstat (limited to 'script/vm')
-rw-r--r-- | script/vm/getDocs.lua | 4 | ||||
-rw-r--r-- | script/vm/getGlobals.lua | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/script/vm/getDocs.lua b/script/vm/getDocs.lua index cfad021c..59651ee9 100644 --- a/script/vm/getDocs.lua +++ b/script/vm/getDocs.lua @@ -44,12 +44,12 @@ function vm.getDocDefines(uri, name) return results end -function vm.isDocDefined(name) +function vm.isDocDefined(uri, name) if define.BuiltinType[name] then return true end local id = 'def:dn:' .. name - if collector:has(id) then + if collector:has(uri, id) then return true end return false diff --git a/script/vm/getGlobals.lua b/script/vm/getGlobals.lua index b9ddedab..8af21d45 100644 --- a/script/vm/getGlobals.lua +++ b/script/vm/getGlobals.lua @@ -4,14 +4,14 @@ local guide = require 'parser.guide' local vm = require 'vm.vm' local noder = require 'core.noder' -function vm.hasGlobalSets(name) +function vm.hasGlobalSets(uri, name) local id if type(name) == 'string' then id = ('def:g:%s%s'):format(noder.STRING_CHAR, name) else id = ('def:g:%s'):format(noder.STRING_CHAR, name) end - return collector:has(id) + return collector:has(uri, id) end function vm.getGlobalSets(uri, name) |