From be1fc07077f8fe3e18fdfbe48042d5a75e326de6 Mon Sep 17 00:00:00 2001 From: Ryan Chipman Date: Sat, 27 Jun 2015 13:47:44 -0400 Subject: Add more thorough description of history to README --- README.md | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f4dbd45..54ab713 100644 --- a/README.md +++ b/README.md @@ -135,17 +135,22 @@ As illustrated above, each change to the text is recorded by an old and a new span. An action consists of multiple changes which logically belong to each other and should thus also be reverted together. For example a search and replace operation is one action with possibly many changes -all over the text. Actions are saved in a tree structure. - -A state of the text can be marked by means of a snapshotting operation. -Snapshotting saves a new node to the history tree and creates a fresh Action -to which future changes will be appended until the next snapshot. -The undo/redo functionality operates on such marked states and switches -between them by traversing adjacent nodes in the tree. - -Undo and Redo move the state of the document up and down on a single branch -of the history tree, but other branches can be accessed with the Earlier -and Later commands, which iterate through snapshotted states chronologically. +all over the text. + +The text states can be marked by means of a snapshotting operation. +Snapshotting saves a new node to the history graph and creates a fresh +Action to which future changes will be appended until the next snapshot. + +Actions make up the nodes of a connected digraph, each representing a state +of the file at some time during the current editing session. The edges of the +digraph represent state transitions that are supported by the editor. The edges +are implemented as four Action pointers (`prev`, `next`, `earlier`, and `later`). + +The editor operations that execute the four aforementioned transitions +are `undo`, `redo`,`earlier`, and `later`, respectively. Undo and +redo behave in the traditional manner, changing the state one Action +at a time. Earlier and later, however, traverse the states in chronological +order, which may occasionally involve undoing and redoing many Actions at once. Properties ---------- -- cgit v1.2.3