summaryrefslogtreecommitdiff
path: root/script/provider/diagnostic.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/provider/diagnostic.lua')
-rw-r--r--script/provider/diagnostic.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua
index f60a9149..ca4bcdb8 100644
--- a/script/provider/diagnostic.lua
+++ b/script/provider/diagnostic.lua
@@ -11,6 +11,7 @@ local progress = require "progress"
local client = require 'client'
local converter = require 'proto.converter'
+---@class diagnosticProvider
local m = {}
m._start = false
m.cache = {}
@@ -139,6 +140,10 @@ function m.clear(uri)
log.debug('clearDiagnostics', uri)
end
+function m.clearCache(uri)
+ m.cache[uri] = false
+end
+
function m.clearAll()
for luri in pairs(m.cache) do
m.clear(luri)
@@ -274,7 +279,7 @@ function m.refresh(uri)
await.call(function () ---@async
await.delay()
if uri then
- m.clear(uri)
+ m.clearCache(uri)
xpcall(m.doDiagnostic, log.error, uri)
end
m.diagnosticsAll()