add another helper function for deletion to line_gap.sml
This commit is contained in:
@@ -1450,6 +1450,46 @@ struct
|
|||||||
, rightLines = rightLines
|
, 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 *)
|
(* TEST CODE *)
|
||||||
local
|
local
|
||||||
|
|||||||
Reference in New Issue
Block a user