From 88f4308a520298c9399850a23dd5f1ae05164334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 5 Nov 2020 21:03:59 +0800 Subject: =?UTF-8?q?table=E7=9A=84hover=E6=9C=80=E5=A4=9A=E5=8F=AA=E6=98=BE?= =?UTF-8?q?=E7=A4=BA1000=E4=B8=AA=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/core/hover/table.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'script-beta/core/hover/table.lua') diff --git a/script-beta/core/hover/table.lua b/script-beta/core/hover/table.lua index ff4012bb..e484553b 100644 --- a/script-beta/core/hover/table.lua +++ b/script-beta/core/hover/table.lua @@ -229,6 +229,7 @@ return function (source) local timeUp local mark = {} local fields = vm.getFields(source, 'deep') + local keyCount = 0 for _, src in ipairs(fields) do local key = getKey(src) if not key then @@ -236,6 +237,7 @@ return function (source) end if not classes[key] then classes[key] = {} + keyCount = keyCount + 1 end if not literals[key] then literals[key] = {} @@ -249,6 +251,9 @@ return function (source) end classes[key][#classes[key]+1] = class literals[key][#literals[key]+1] = literal + if keyCount >= 1000 then + break + end ::CONTINUE:: end -- cgit v1.2.3