MCPcopy
hub / github.com/DHTMLX/gantt / makeChangeInner

Function makeChangeInner

samples/common/codehighlight/codemirror.js:5282–5297  ·  view source on GitHub ↗
(doc, change)

Source from the content-addressed store, hash-verified

5280 }
5281
5282 function makeChangeInner(doc, change) {
5283 if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) { return }
5284 var selAfter = computeSelAfterChange(doc, change);
5285 addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);
5286
5287 makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));
5288 var rebased = [];
5289
5290 linkedDocs(doc, function (doc, sharedHist) {
5291 if (!sharedHist && indexOf(rebased, doc.history) == -1) {
5292 rebaseHist(doc.history, change);
5293 rebased.push(doc.history);
5294 }
5295 makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));
5296 });
5297 }
5298
5299 // Revert a change stored in a document's history.
5300 function makeChangeFromHistory(doc, type, allowSelectionOnly) {

Callers 1

makeChangeFunction · 0.85

Calls 8

cmpFunction · 0.85
computeSelAfterChangeFunction · 0.85
addChangeToHistoryFunction · 0.85
makeChangeSingleDocFunction · 0.85
stretchSpansOverChangeFunction · 0.85
linkedDocsFunction · 0.85
indexOfFunction · 0.85
rebaseHistFunction · 0.85

Tested by

no test coverage detected