From fecdb2af1ceba45021486d1e28d8e11f490d2b36 Mon Sep 17 00:00:00 2001
From: sumneko <sumneko@hotmail.com>
Date: Sun, 23 Jan 2022 02:29:34 +0800
Subject: fix

---
 script/provider/diagnostic.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'script/provider')

diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua
index 94e69838..0655b1c7 100644
--- a/script/provider/diagnostic.lua
+++ b/script/provider/diagnostic.lua
@@ -282,12 +282,12 @@ function m.refresh(uri)
     end
     await.close('diag:' .. uri)
     await.call(function () ---@async
+        m.diagnosticsScope(uri)
         if uri then
             await.setID('diag:' .. uri)
             await.sleep(0.1)
             xpcall(m.doDiagnostic, log.error, uri)
         end
-        m.diagnosticsScope(uri)
     end)
 end
 
@@ -355,7 +355,7 @@ function m.diagnosticsScope(uri, force)
     local id = 'diagnosticsScope:' .. scp:getName()
     await.close(id)
     await.call(function () ---@async
-        await.sleep(math.max(delay, 0.1))
+        await.sleep(math.max(delay, 0.2))
         while loading.count() > 0 do
             await.sleep(1.0)
         end
-- 
cgit v1.2.3