summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-06-10 20:15:58 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-06-10 20:15:58 +0800
commit840947ef84baa30356bea82c87f81908876fd206 (patch)
treeeaa0d1eab17c9591f913d94e27d8ec2ccae37894
parentf47f07842b57ba0daf1e7b59b36df4327f764c7f (diff)
downloadlua-language-server-840947ef84baa30356bea82c87f81908876fd206.zip
cleanup
-rw-r--r--script/core/searcher.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/script/core/searcher.lua b/script/core/searcher.lua
index b94b938c..f6c34425 100644
--- a/script/core/searcher.lua
+++ b/script/core/searcher.lua
@@ -511,7 +511,12 @@ function m.searchRefsByID(status, uri, expect, mode)
function searchStep(id, field)
stepCount = stepCount + 1
if stepCount > 1000 then
- error('too large')
+ if TEST then
+ error('too large!')
+ else
+ log.warn('too large!')
+ return
+ end
end
local node = noder.getNodeByID(root, id)
if node then