summaryrefslogtreecommitdiff
path: root/script/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-01-31 18:43:22 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-01-31 18:43:22 +0800
commit05b2d2faf2f5d07c660d46f8eac5fd5cfc56c47b (patch)
treeca9d02117793462cde595426cfb1fa5ecc07ca40 /script/parser
parent3255420da8236363864d12ab64f61cfa32024e35 (diff)
downloadlua-language-server-05b2d2faf2f5d07c660d46f8eac5fd5cfc56c47b.zip
supports all schemes
resolve #1862
Diffstat (limited to 'script/parser')
-rw-r--r--script/parser/guide.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index f3b5d502..0b6de77d 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -479,6 +479,9 @@ function m.getLocal(source, name, pos)
if not block then
return nil
end
+ if block.type == 'main' then
+ break
+ end
if block.start <= pos
and block.finish >= pos
and blockTypes[block.type] then