From 55f584fd59b485cba0742218f57b134b93ff20e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 20 Dec 2018 19:08:49 +0800 Subject: =?UTF-8?q?=E5=A7=8B=E7=BB=88=E8=AE=B0=E7=9D=80=E8=87=AA=E5=B7=B1?= =?UTF-8?q?=E7=9A=84uri=E5=90=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/matcher/definition.lua | 4 ++-- server/src/matcher/vm.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'server') 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() -- cgit v1.2.3