diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-11 14:52:09 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-11 14:52:09 +0800 |
commit | 764084f9d2e8f7bb69aea8fc97453f10c9ba7f77 (patch) | |
tree | b1db5b23a9e7569eec21f7df250fd61d0cd7a343 /server/src/vm | |
parent | f34e6c5ff4ed205881db18049c4a3db542c90b6b (diff) | |
download | lua-language-server-764084f9d2e8f7bb69aea8fc97453f10c9ba7f77.zip |
更新crossfile
Diffstat (limited to 'server/src/vm')
-rw-r--r-- | server/src/vm/global.lua | 10 | ||||
-rw-r--r-- | server/src/vm/value.lua | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/server/src/vm/global.lua b/server/src/vm/global.lua index 4e368641..ba5da73a 100644 --- a/server/src/vm/global.lua +++ b/server/src/vm/global.lua @@ -6,11 +6,11 @@ return function (lsp) local global = lsp and lsp.globalValue if not global then global = createValue('table') - end - for name, lib in pairs(library.global) do - if not global:rawGet(name) then - local value = libraryBuilder.value(lib) - global:rawSet(name, value) + for name, lib in pairs(library.global) do + if not global:rawGet(name) then + local value = libraryBuilder.value(lib) + global:rawSet(name, value) + end end end if lsp then diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua index 8124b484..a3aad7a6 100644 --- a/server/src/vm/value.lua +++ b/server/src/vm/value.lua @@ -235,6 +235,9 @@ function mt:mergeValue(value) if value._lib then self._lib = value._lib end + if value.uri then + self.uri = value.uri + end end function mt:addInfo(tp, source, ...) |