add deletion to compare-testing (deletion does not work properly yet, as expected)

This commit is contained in:
2024-07-14 17:49:05 +01:00
parent 7c7a4103d8
commit d8b65a5546

View File

@@ -8,9 +8,14 @@ fun compareTxns arr =
val oldRope = rope
val strSize = String.size insStr
val rope =
if delNum > 0 then TinyRope.delete (pos, delNum, rope) else rope
val rope =
if strSize > 0 then TinyRope.insert (pos, insStr, rope) else rope
val gapBuffer =
if delNum > 0 then LineGap.delete (pos, delNum, gapBuffer)
else gapBuffer
val gapBuffer =
if strSize > 0 then LineGap.insert (pos, insStr, gapBuffer)
else gapBuffer