summaryrefslogtreecommitdiff
path: root/server/src/service.lua
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 /server/src/service.lua
parent70075c6b951b5af948ff7f3550d136a9863ebf48 (diff)
downloadlua-language-server-395dcc32c243724226cff241da94f1e811f3734c.zip
修改移除诊断标记的时机
Diffstat (limited to 'server/src/service.lua')
-rw-r--r--server/src/service.lua3
1 files changed, 2 insertions, 1 deletions
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,