fix bug in building search list from range: if first index is less than 0, then start from 0, or else start from calculation

This commit is contained in:
2025-08-03 13:41:11 +01:00
parent 16fdfc7ac2
commit 904526cd63

View File

@@ -133,6 +133,7 @@ struct
let
val finishIdx = startIdx + length + String.size searchString
val bufferIdx = startIdx - String.size searchString
val bufferIdx = Int.max (bufferIdx, 0)
in
helpFromRange
(startIdx, bufferIdx, finishIdx, buffer, searchString, searchList)