@@ -249,7 +249,8 @@ function m.searchRefsByID(status, uri, expect, mode)
249
249
250
250
local callStack = status .callStack
251
251
252
- local mark = {}
252
+ local mark = status .flock [uri ] or {}
253
+ status .flock [uri ] = mark
253
254
254
255
local function search (id , field )
255
256
local firstID = noder .getFirstID (id )
@@ -297,7 +298,8 @@ function m.searchRefsByID(status, uri, expect, mode)
297
298
cmark = {}
298
299
mark [id ] = cmark
299
300
end
300
- if cmark [LAST ] then
301
+ local fieldLength = noder .getIDLength (field )
302
+ if cmark [LAST ] and fieldLength >= cmark [LAST ] then
301
303
return
302
304
end
303
305
local lastID = noder .getLastID (id )
@@ -308,7 +310,7 @@ function m.searchRefsByID(status, uri, expect, mode)
308
310
if field then
309
311
newField = newField .. field
310
312
end
311
- cmark [LAST ] = true
313
+ cmark [LAST ] = fieldLength
312
314
search (lastID , newField )
313
315
return lastID
314
316
end
@@ -620,10 +622,10 @@ function m.searchRefsByID(status, uri, expect, mode)
620
622
621
623
local stepCount = 0
622
624
local stepMaxCount = 1e3
623
- local statusMaxCount = 1e4
625
+ local statusMaxCount = 1e5
624
626
if mode == ' allref' or mode == ' alldef' then
625
627
stepMaxCount = 1e4
626
- statusMaxCount = 1e5
628
+ statusMaxCount = 1e6
627
629
end
628
630
function searchStep (id , field )
629
631
stepCount = stepCount + 1
@@ -853,6 +855,7 @@ function m.status(mode)
853
855
callStack = {},
854
856
crossed = {},
855
857
lock = {},
858
+ flock = {},
856
859
results = {},
857
860
rmark = {},
858
861
smark = {},
0 commit comments