in BinSearch.equalOrMore and BinSearch.equalOrLess, return ~1 if no item is found, for the sake of less ambiguity in usage. Functions that call these have also been adapted.

This commit is contained in:
2025-09-13 02:18:14 +01:00
parent 53a4265b07
commit 20a542df29
6 changed files with 17 additions and 7 deletions

View File

@@ -60,7 +60,7 @@ struct
let
val searchPos = BinSearch.equalOrMore (pos + 1, #searchList env)
in
if searchPos = Vector.length line then
if searchPos = ~1 then
(* next line is not in this node *)
let
val absIdx = absIdx - pos