summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/config.lua2
-rw-r--r--script/core/guide2.lua8
2 files changed, 7 insertions, 3 deletions
diff --git a/script/config.lua b/script/config.lua
index 97df7c17..50aab037 100644
--- a/script/config.lua
+++ b/script/config.lua
@@ -131,7 +131,7 @@ local ConfigTemplate = {
meta = {'${version} ${language}', String},
unicodeName = {false, Boolean},
nonstandardSymbol = {{}, Str2Hash ';'},
- plugin = {'.vscode/lua/plugin.lua', String},
+ plugin = {'', String},
fileEncoding = {'utf8', String},
builtin = {{}, Hash(String, String)},
},
diff --git a/script/core/guide2.lua b/script/core/guide2.lua
index 576c0c20..183555b3 100644
--- a/script/core/guide2.lua
+++ b/script/core/guide2.lua
@@ -3021,7 +3021,7 @@ function m.searchSameFields(status, simple, mode)
locks[start] = lock
end
if lock[obj] then
- return
+ return false
end
lock[obj] = true
queueLen = queueLen + 1
@@ -3037,13 +3037,17 @@ function m.searchSameFields(status, simple, mode)
forces[queueLen] = force
end
end
+ return true
end
local function pushQueue(obj, start, force)
if obj.type == 'getlocal'
or obj.type == 'setlocal' then
obj = obj.node
end
- appendQueue(obj, start, force)
+ if appendQueue(obj, start, force) == false then
+ -- no need to process the rest if obj is already locked
+ return
+ end
if obj.type == 'local' and obj.ref then
for _, ref in ipairs(obj.ref) do
appendQueue(ref, start, force)