From 395dcc32c243724226cff241da94f1e811f3734c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 23 Jan 2019 17:55:30 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A7=BB=E9=99=A4=E8=AF=8A=E6=96=AD?= =?UTF-8?q?=E6=A0=87=E8=AE=B0=E7=9A=84=E6=97=B6=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/core/vm.lua | 1 - server/src/service.lua | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/core/vm.lua b/server/src/core/vm.lua index 2f2a5dbf..8c27c13a 100644 --- a/server/src/core/vm.lua +++ b/server/src/core/vm.lua @@ -371,7 +371,6 @@ function mt:createField(pValue, name, source) end pValue.child[name] = field self:inference(pValue, 'table') - return field end diff --git a/server/src/service.lua b/server/src/service.lua index 6c7b83d7..be3872b5 100644 --- a/server/src/service.lua +++ b/server/src/service.lua @@ -338,10 +338,10 @@ function mt:doDiagnostics(uri) if not self._needDiagnostics[uri] then return end - self._needDiagnostics[uri] = nil local name = 'textDocument/publishDiagnostics' local vm, lines = self:getVM(uri) if not vm then + self._needDiagnostics[uri] = nil self:clearDiagnostics(uri) return end @@ -351,6 +351,7 @@ function mt:doDiagnostics(uri) lines = lines, } local res = self:_callMethod(name, data) + self._needDiagnostics[uri] = nil if res then rpc:notify(name, { uri = uri, -- cgit v1.2.3