From 19c55017770e7de8b1403d37eb4b08a50ee5b78b Mon Sep 17 00:00:00 2001 From: Humza Shahid Date: Tue, 9 Jul 2024 23:45:35 +0100 Subject: [PATCH] add another helper function for deletion to line_gap.sml --- src/line_gap.sml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/line_gap.sml b/src/line_gap.sml index 202f2ba..1ef87ba 100644 --- a/src/line_gap.sml +++ b/src/line_gap.sml @@ -1450,6 +1450,46 @@ struct , rightLines = rightLines } + fun deleteFromLetAndRight + ( start + , finish + , curIdx + , curLine + , leftStrings + , leftLines + , rightStrings + , rightLines + ) = + let + val + { idx = curIdx + , line = curLine + , leftStrings + , leftLines + , rightStrings + , rightLines + } = deleteRightFromHere + ( curIdx + , curLine + , curIdx + , finish + , leftStrings + , leftLines + , rightStrings + , rightLines + ) + in + deleteLeftFromHere + ( start + , curIdx + , curLine + , leftStrings + , leftLines + , rightStrings + , rightLines + ) + end + (* TEST CODE *) local