MCPcopy Create free account
hub / github.com/TruthHun/BookStack / makeChangeInner

Function makeChangeInner

static/mergely/lib/codemirror.js:4380–4395  ·  view source on GitHub ↗
(doc, change)

Source from the content-addressed store, hash-verified

4378 }
4379
4380 function makeChangeInner(doc, change) {
4381 if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) return;
4382 var selAfter = computeSelAfterChange(doc, change);
4383 addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);
4384
4385 makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));
4386 var rebased = [];
4387
4388 linkedDocs(doc, function(doc, sharedHist) {
4389 if (!sharedHist && indexOf(rebased, doc.history) == -1) {
4390 rebaseHist(doc.history, change);
4391 rebased.push(doc.history);
4392 }
4393 makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));
4394 });
4395 }
4396
4397 // Revert a change stored in a document's history.
4398 function makeChangeFromHistory(doc, type, allowSelectionOnly) {

Callers 1

makeChangeFunction · 0.70

Calls 8

computeSelAfterChangeFunction · 0.70
addChangeToHistoryFunction · 0.70
makeChangeSingleDocFunction · 0.70
stretchSpansOverChangeFunction · 0.70
linkedDocsFunction · 0.70
indexOfFunction · 0.70
rebaseHistFunction · 0.70
cmpFunction · 0.50

Tested by

no test coverage detected