MCPcopy
hub / github.com/csev/py4e / historyChangeFromChange

Function historyChangeFromChange

tools/pythonauto/static/codemirrorepl/codemirror.js:6552–6557  ·  view source on GitHub ↗
(doc, change)

Source from the content-addressed store, hash-verified

6550 // Create a history change event from an updateDoc-style change
6551 // object.
6552 function historyChangeFromChange(doc, change) {
6553 var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};
6554 attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);
6555 linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);}, true);
6556 return histChange;
6557 }
6558
6559 // Pop all selection events off the end of a history array. Stop at
6560 // a change event.

Callers 2

makeChangeFromHistoryFunction · 0.70
addChangeToHistoryFunction · 0.70

Calls 4

copyPosFunction · 0.70
getBetweenFunction · 0.70
attachLocalSpansFunction · 0.70
linkedDocsFunction · 0.70

Tested by

no test coverage detected