diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-08-16 01:58:46 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-08-16 01:58:46 +0800 |
commit | c3cec6c8cd20c319c291431fbec55f1d1d596c6d (patch) | |
tree | 55047c4bac77a2bf3d82d1286612cdd799c18949 /script-beta/workspace/workspace.lua | |
parent | bb1e4a1d0ef31d0ed5d82df22a103cecfe79b251 (diff) | |
download | lua-language-server-c3cec6c8cd20c319c291431fbec55f1d1d596c6d.zip |
限制回看层级
Diffstat (limited to 'script-beta/workspace/workspace.lua')
-rw-r--r-- | script-beta/workspace/workspace.lua | 7 |
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 |