MCPcopy Create free account
hub / github.com/breck7/scroll / History

Function History

external/.scrollLibs.js:6605–6619  ·  view source on GitHub ↗
(startGen)

Source from the content-addressed store, hash-verified

6603 }
6604
6605 function History(startGen) {
6606 // Arrays of change events and selections. Doing something adds an
6607 // event to done and clears undo. Undoing moves events from done
6608 // to undone, redoing moves them in the other direction.
6609 this.done = []
6610 this.undone = []
6611 this.undoDepth = Infinity
6612 // Used to track when changes can be merged into a single undo
6613 // event
6614 this.lastModTime = this.lastSelTime = 0
6615 this.lastOp = this.lastSelOp = null
6616 this.lastOrigin = this.lastSelOrigin = null
6617 // Used by the isClean() method
6618 this.generation = this.maxGeneration = startGen || 1
6619 }
6620
6621 // Create a history change event from an updateDoc-style change
6622 // object.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected