amend few bugs - now there is another error with buffer having wrong index
This commit is contained in:
@@ -1509,15 +1509,21 @@ struct
|
|||||||
let
|
let
|
||||||
val length = start - prevIdx
|
val length = start - prevIdx
|
||||||
val newStr = String.substring (leftStringsHd, 0, length)
|
val newStr = String.substring (leftStringsHd, 0, length)
|
||||||
val midpoint = binSearch (String.size newStr - 1, leftLinesHd)
|
|
||||||
val newLines =
|
val newLines =
|
||||||
let
|
if Vector.length leftLinesHd > 0 then
|
||||||
val _ = println "1461"
|
let
|
||||||
val slice = VectorSlice.slice
|
val midpoint = binSearch
|
||||||
(leftLinesHd, 0, SOME (midpoint + 1))
|
(String.size newStr - 1, leftLinesHd)
|
||||||
in
|
val _ = println "1461"
|
||||||
VectorSlice.vector slice
|
val _ = println
|
||||||
end
|
("vlen = " ^ (Int.toString (Vector.length leftLinesHd)))
|
||||||
|
val slice = VectorSlice.slice
|
||||||
|
(leftLinesHd, 0, SOME (midpoint + 1))
|
||||||
|
in
|
||||||
|
VectorSlice.vector slice
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Vector.fromList []
|
||||||
val _ = println "1433"
|
val _ = println "1433"
|
||||||
in
|
in
|
||||||
{ idx = prevIdx + String.size newStr
|
{ idx = prevIdx + String.size newStr
|
||||||
@@ -1906,17 +1912,20 @@ struct
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
| (_, _) =>
|
| (_, _) =>
|
||||||
(* Left strings and lines are empty, so just return. *)
|
(* Right strings and lines are empty, so can't join. *)
|
||||||
let
|
let
|
||||||
val _ = println "1814"
|
val _ = println "1814"
|
||||||
in
|
in
|
||||||
{ idx = 0
|
deleteLeftFromHere
|
||||||
, line = 0
|
( start
|
||||||
, leftStrings = []
|
, prevIdx
|
||||||
, leftLines = []
|
, curLine - Vector.length leftLinesHd
|
||||||
, rightStrings = rightStrings
|
, leftStringsTl
|
||||||
, rightLines = rightLines
|
, leftLinesTl
|
||||||
}
|
, [leftStringsHd]
|
||||||
|
, [leftLinesHd]
|
||||||
|
)
|
||||||
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
| (_, _) =>
|
| (_, _) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user