summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-20 19:08:49 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-20 19:08:49 +0800
commit55f584fd59b485cba0742218f57b134b93ff20e2 (patch)
treeb1f09b3f2b81da375e2d16e4d95a7a9f106fc851 /server
parent47341b8fbbf56cbdbe4a3bc320edf5068e81130c (diff)
downloadlua-language-server-55f584fd59b485cba0742218f57b134b93ff20e2.zip
始终记着自己的uri吧
Diffstat (limited to 'server')
-rw-r--r--server/src/matcher/definition.lua4
-rw-r--r--server/src/matcher/vm.lua2
2 files changed, 3 insertions, 3 deletions
diff --git a/server/src/matcher/definition.lua b/server/src/matcher/definition.lua
index 4d739fba..b325f46c 100644
--- a/server/src/matcher/definition.lua
+++ b/server/src/matcher/definition.lua
@@ -4,7 +4,7 @@ local function parseResult(vm, result)
local positions = {}
local tp = result.type
if tp == 'local' then
- if result.value.uri and result.value.uri ~= vm.uri then
+ if result.value.uri ~= vm.uri then
positions[#positions+1] = {
result.value.source.start,
result.value.source.finish,
@@ -18,7 +18,7 @@ local function parseResult(vm, result)
end
end
elseif tp == 'field' then
- if result.value.uri and result.value.uri ~= vm.uri then
+ if result.value.uri ~= vm.uri then
positions[#positions+1] = {
result.value.source.start,
result.value.source.finish,
diff --git a/server/src/matcher/vm.lua b/server/src/matcher/vm.lua
index 9e559fa7..b7941b2c 100644
--- a/server/src/matcher/vm.lua
+++ b/server/src/matcher/vm.lua
@@ -578,6 +578,7 @@ function mt:createValue(tp, source, v)
type = tp,
source = source or DefaultSource,
value = v,
+ uri = self.uri,
}
local lib = library.object[tp]
if lib then
@@ -1183,7 +1184,6 @@ function mt:mergeRequire(value, destVM)
mainValue = deepCopy(main.returns[1])
end
self:mergeValue(value, mainValue)
- value.uri = destVM.uri
end
function mt:loadRequires()