summaryrefslogtreecommitdiff
path: root/server/src/service.lua
diff options
context:
space:
mode:
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,