summaryrefslogtreecommitdiff
path: root/script/core/completion
diff options
context:
space:
mode:
authorCppCXY <812125110@qq.com>2022-12-13 20:46:30 +0800
committerCppCXY <812125110@qq.com>2022-12-13 20:46:30 +0800
commit118fa32384c01f60dad211e891918c4ff941604a (patch)
treebc8d97c263bc3090762508ad31d7c38caec23ede /script/core/completion
parent6d740a76ce170c396108e8bfc26b1286ac32c62f (diff)
downloadlua-language-server-118fa32384c01f60dad211e891918c4ff941604a.zip
修复补全性能问题
Diffstat (limited to 'script/core/completion')
-rw-r--r--script/core/completion/completion.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua
index cbc8cd07..ffdf6413 100644
--- a/script/core/completion/completion.lua
+++ b/script/core/completion/completion.lua
@@ -534,6 +534,9 @@ local function checkFieldOfRefs(refs, state, word, startPos, position, parent, o
local funcs = {}
local count = 0
for _, src in ipairs(refs) do
+ if count > 100 then
+ break
+ end
local _, name = vm.viewKey(src, state.uri)
if not name then
goto CONTINUE