fix regression caused by 'TextBuilder.advanceSearchPos' function. We were previously checking if the absIdx is in the search range and advancing based on whether that is true or false, but we should only advance if absIdx is after the search range

This commit is contained in:
2025-08-31 01:33:20 +01:00
parent 5ba82ea7e1
commit 648346e5ba

View File

@@ -333,14 +333,10 @@ struct
end
fun advanceSearchPos (absIdx, searchPos, searchHd, searchLen) =
let
val searchIdx = Vector.sub (searchHd, searchPos)
in
if absIdx >= searchIdx andalso absIdx < searchIdx + searchLen then
searchPos
else
searchPos + 1
end
if isAfterSearchRange (absIdx, searchPos, searchHd, searchLen) then
searchPos + 1
else
searchPos
fun buildTextStringSearch
( pos