summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-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,