diff options
-rw-r--r-- | server/src/core/implementation.lua | 2 | ||||
-rw-r--r-- | server/src/service.lua | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/server/src/core/implementation.lua b/server/src/core/implementation.lua index 5385d9f9..36a990ee 100644 --- a/server/src/core/implementation.lua +++ b/server/src/core/implementation.lua @@ -94,7 +94,7 @@ end local function parseValue(vm, source, lsp) local value = source:bindValue() - if value.uri ~= vm.uri then + if value.uri ~= '' and value.uri ~= vm.uri then return parseValueCrossFile(vm, source, lsp) end local positions = {} diff --git a/server/src/service.lua b/server/src/service.lua index 42f0e1a0..74ff98e7 100644 --- a/server/src/service.lua +++ b/server/src/service.lua @@ -540,8 +540,12 @@ function mt:_testMemory() end self._clock = os.clock() local cachedVM = 0 - for _ in pairs(self._file) do - cachedVM = cachedVM + 1 + local cachedSource = 0 + for _, obj in pairs(self._file) do + if obj.vm then + cachedVM = cachedVM + 1 + cachedSource = cachedSource + #obj.vm.sources + end end local aliveVM = 0 local deadVM = 0 @@ -569,12 +573,14 @@ function mt:_testMemory() CachedVM: [%d]\n\z AlivedVM: [%d]\n\z DeadVM: [%d]\n\z + CachedSrc:[%d]\n\z AlivedSrc:[%d]\n\z DeadSrc: [%d]'):format( mem, cachedVM, aliveVM, deadVM, + cachedSource, alivedSource, deadSource )) |