Add another edit to the history.
Add another edit to the history. Unless merging is blocked, it tries to merge this edit with the most recent edit. Afterwards, the internal merge-block flag is cleared.
Disallow the merging of the next edit to be added.
Disallow the merging of the next edit to be added. This can be used to avoid merging edits if the editor component was temporarily unfocused, for example.
Whether there are edits that can be redone, and thus whether redo
and redoName
may be called.
Whether there are undoable edits and thus undo
and undoName
may be called.
Creates an automatic edit from tracing events on a document and terminal.
Creates an automatic edit from tracing events on a document and terminal. The edit, if not empty, will be added to the history before returning.
the name of the resulting edit
the document to temporarily trace
the terminal to temporarily trace
an action that produces events as a side effect. These events will make up the edit.
Clears the history, removing all edits.
Clears the history, removing all edits. Afterwards, canUndo
and canRedo
will return false
.
Throws an exception if !canRedo
Throws an exception if !canRedo
Throws an exception if !canUndo
Throws an exception if !canUndo
Undo-redo management.
Notifies observers when
canUndo
,canRedo
,undoName
, orredoName
change.