summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/core/searcher.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/script/core/searcher.lua b/script/core/searcher.lua
index 79b605b5..f29b6a29 100644
--- a/script/core/searcher.lua
+++ b/script/core/searcher.lua
@@ -181,10 +181,10 @@ function m.getObjectValue(obj)
end
local function crossSearch(status, uri, expect, mode, sourceUri)
- if status.lock[uri] then
+ if status.lock[uri] and status.lock[uri] >= 3 then
return
end
- status.lock[uri] = true
+ status.lock[uri] = (status.lock[uri] or 0) + 1
--await.delay()
if TRACE then
log.debug('crossSearch', uri, expect)
@@ -193,7 +193,10 @@ local function crossSearch(status, uri, expect, mode, sourceUri)
status.footprint[#status.footprint+1] = ('cross search:%s %s'):format(uri, expect)
end
m.searchRefsByID(status, uri, expect, mode)
- status.lock[uri] = nil
+ status.lock[uri] = status.lock[uri] - 1
+ if TRACE then
+ log.debug('crossSearch finish, back to:', uri)
+ end
if FOOTPRINT then
status.footprint[#status.footprint+1] = ('cross search finish, back to: %s'):format(sourceUri)
end