summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-12 15:08:43 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-12 15:08:43 +0800
commit095984fc21264c4c13f785ef833d4711034dc28f (patch)
tree4ec3df7224bb5130b433301733c08eb6213df54e /server
parent9efa5581ec3c628694c71c77970e769b83b31b00 (diff)
downloadlua-language-server-095984fc21264c4c13f785ef833d4711034dc28f.zip
调整诊断策略
Diffstat (limited to 'server')
-rw-r--r--server/src/service.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/src/service.lua b/server/src/service.lua
index bb8f59b1..4141b172 100644
--- a/server/src/service.lua
+++ b/server/src/service.lua
@@ -468,9 +468,13 @@ function mt:_createCompileTask()
if uri then
self:compileVM(uri)
end
- local uri = next(self._needDiagnostics)
- if uri then
+ if self._needDiagnostics[uri] then
self:doDiagnostics(uri)
+ else
+ uri = next(self._needDiagnostics)
+ if uri then
+ self:doDiagnostics(uri)
+ end
end
end)
end