Delete one unit before (direction -1) or after (1) the caret, or the selection if there is one.
- edit: the text being edited.
- unit: how much to delete.
- direction: -1 for before the caret, 1 for after.
delete_by :: (edit: *Text_Edit, unit: Unit, direction: int)
Delete one unit before (direction -1) or after (1) the caret, or the selection if there is one.