ChangeImpl

interface ChangeImpl : Change

Functions

Link copied to clipboard
open fun canMergeWith(previous: Change): Boolean

When typing, lots of Change objects will be created. Undoing / redoing each character isn't what the user expects. So instead, Changes have the option to merge.

Link copied to clipboard
open fun mergeWith(previous: Change)

Mutates previous, so that it also encompasses the changes in this.

Link copied to clipboard
abstract fun redo()
Link copied to clipboard
abstract fun undo()