summaryrefslogtreecommitdiff
path: root/server/src/core/vm.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-25 10:05:34 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-25 10:05:34 +0800
commit21e3a0f6e980293a72c6ba9d70b408d6dc6a43ff (patch)
tree7f8758af69d5343018b69db1c273ebe9f2476521 /server/src/core/vm.lua
parentfffac853964beebbfc1c335984193798a205fb67 (diff)
downloadlua-language-server-21e3a0f6e980293a72c6ba9d70b408d6dc6a43ff.zip
允许提前跳出编译
Diffstat (limited to 'server/src/core/vm.lua')
-rw-r--r--server/src/core/vm.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/src/core/vm.lua b/server/src/core/vm.lua
index 965a0bec..79381876 100644
--- a/server/src/core/vm.lua
+++ b/server/src/core/vm.lua
@@ -1459,7 +1459,11 @@ function mt:doActions(actions)
for _, action in ipairs(actions) do
self:doAction(action)
if coroutine.isyieldable() then
- coroutine.yield()
+ if self.lsp:isNeedCompile(self.uri) then
+ coroutine.yield()
+ else
+ coroutine.yield('stop')
+ end
end
end
end