summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-06-28 20:52:10 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-06-28 20:52:10 +0800
commit36ae602074c2324cff46cadb3c742526708a9a72 (patch)
treeac07709700026a59a567b1847956ecbc6ceb3a47 /script
parent86c17f83e5b94ed478231b68bffc648a479e89f5 (diff)
downloadlua-language-server-36ae602074c2324cff46cadb3c742526708a9a72.zip
stash
Diffstat (limited to 'script')
-rw-r--r--script/core/searcher.lua14
1 files changed, 13 insertions, 1 deletions
diff --git a/script/core/searcher.lua b/script/core/searcher.lua
index f068ed59..f7e8da06 100644
--- a/script/core/searcher.lua
+++ b/script/core/searcher.lua
@@ -243,7 +243,7 @@ end
local function checkMark(mark, id, field)
if noder.getIDLength(id) > 10 then
- return false
+ print(1)
end
local cmark = mark[id]
if not cmark then
@@ -253,6 +253,18 @@ local function checkMark(mark, id, field)
if cmark[field or ''] then
return false
end
+ local right = ''
+ while field and field ~= '' do
+ local lastID = noder.getLastID(field)
+ if not lastID then
+ break
+ end
+ right = lastID .. right
+ if cmark[right] then
+ return false
+ end
+ field = field:sub(1, - #lastID - 1)
+ end
cmark[field or ''] = true
return true
end