summaryrefslogtreecommitdiff
path: root/script-beta/workspace/workspace.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-08-16 01:58:46 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-08-16 01:58:46 +0800
commitc3cec6c8cd20c319c291431fbec55f1d1d596c6d (patch)
tree55047c4bac77a2bf3d82d1286612cdd799c18949 /script-beta/workspace/workspace.lua
parentbb1e4a1d0ef31d0ed5d82df22a103cecfe79b251 (diff)
downloadlua-language-server-c3cec6c8cd20c319c291431fbec55f1d1d596c6d.zip
限制回看层级
Diffstat (limited to 'script-beta/workspace/workspace.lua')
-rw-r--r--script-beta/workspace/workspace.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/script-beta/workspace/workspace.lua b/script-beta/workspace/workspace.lua
index 70f5616b..89470beb 100644
--- a/script-beta/workspace/workspace.lua
+++ b/script-beta/workspace/workspace.lua
@@ -134,9 +134,7 @@ function m.awaitPreload()
if read >= max then
break
end
- await.sleep(0.1, function ()
- return m.preloadVersion
- end)
+ await.sleep(0.1)
end
log.info('Preload finish.')
@@ -201,6 +199,9 @@ function m.reload()
m.preloadVersion = m.preloadVersion + 1
files.removeAll()
await.create(function ()
+ await.setDelayer(function ()
+ return m.preloadVersion
+ end)
m.awaitPreload()
end)
end