summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-23 17:55:30 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-23 17:55:30 +0800
commit395dcc32c243724226cff241da94f1e811f3734c (patch)
tree2e612392089f5efb60cdd4032329f7d460807d07
parent70075c6b951b5af948ff7f3550d136a9863ebf48 (diff)
downloadlua-language-server-395dcc32c243724226cff241da94f1e811f3734c.zip
修改移除诊断标记的时机
-rw-r--r--server/src/core/vm.lua1
-rw-r--r--server/src/service.lua3
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,