fix bug: when we want to skip to next line in TextBuilderWithCursor, we were using binary search on the search list. The search list contained the indices of matched searches, but what we wanted to use binary search on are the lines, as the lines can help us find the next linebreak if any. So, we perform binary search on the lines vector this time to fix the bug.
This commit is contained in:
@@ -58,7 +58,7 @@ struct
|
||||
else
|
||||
(* bin search lines *)
|
||||
let
|
||||
val searchPos = BinSearch.equalOrMore (pos + 1, #searchList env)
|
||||
val searchPos = BinSearch.equalOrMore (pos + 1, line)
|
||||
in
|
||||
if searchPos = ~1 then
|
||||
(* next line is not in this node *)
|
||||
|
||||
Reference in New Issue
Block a user