diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-06-28 20:52:10 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-06-28 20:52:10 +0800 |
commit | 36ae602074c2324cff46cadb3c742526708a9a72 (patch) | |
tree | ac07709700026a59a567b1847956ecbc6ceb3a47 /script | |
parent | 86c17f83e5b94ed478231b68bffc648a479e89f5 (diff) | |
download | lua-language-server-36ae602074c2324cff46cadb3c742526708a9a72.zip |
stash
Diffstat (limited to 'script')
-rw-r--r-- | script/core/searcher.lua | 14 |
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 |