From ace1606ad0829e4b4b322f32eb02ca3a4b7ede7d 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, 13 Mar 2019 10:44:49 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=8A=E6=96=AD=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/service.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'server/src/service.lua') diff --git a/server/src/service.lua b/server/src/service.lua index cd3d24ed..7350ed95 100644 --- a/server/src/service.lua +++ b/server/src/service.lua @@ -220,6 +220,9 @@ function mt:loadVM(uri) return nil end self:compileVM(uri) + if obj.vm then + self._lastLoadedVM = uri + end return obj.vm, obj.lines, obj.text end @@ -472,17 +475,14 @@ function mt:_createCompileTask() return end self._compileTask = coroutine.create(function () + self:doDiagnostics(self._lastLoadedVM) local uri = self._needCompile[1] if uri then self:compileVM(uri) end - if self._needDiagnostics[uri] then + uri = next(self._needDiagnostics) + if uri then self:doDiagnostics(uri) - else - uri = next(self._needDiagnostics) - if uri then - self:doDiagnostics(uri) - end end end) end -- cgit v1.2.3