port over bug fixes from mutually recursive functions from test-builder-with-cursor.sml to text-builder-with-highlight.sml
This commit is contained in:
@@ -58,9 +58,9 @@ struct
|
||||
else
|
||||
(* bin search lines *)
|
||||
let
|
||||
val searchPos = BinSearch.equalOrMore (pos + 1, line)
|
||||
val linePos = BinSearch.equalOrMore (pos + 1, line)
|
||||
in
|
||||
if searchPos = ~1 then
|
||||
if linePos = ~1 then
|
||||
(* next line is not in this node *)
|
||||
let
|
||||
val absIdx = absIdx - pos
|
||||
@@ -71,7 +71,7 @@ struct
|
||||
end
|
||||
else
|
||||
let
|
||||
val lineOffset = Vector.sub (line, searchPos)
|
||||
val lineOffset = Vector.sub (line, linePos)
|
||||
val newStrPos = lineOffset + 1
|
||||
val absIdx = absIdx - pos + newStrPos
|
||||
val posY = posY + TC.ySpace
|
||||
|
||||
Reference in New Issue
Block a user