MCPcopy Create free account
hub / github.com/sql-js/sql.js / makeChangeInner

Function makeChangeInner

GUI/codemirror/lib/codemirror.js:3318–3333  ·  view source on GitHub ↗
(doc, change)

Source from the content-addressed store, hash-verified

3316 }
3317
3318 function makeChangeInner(doc, change) {
3319 if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) return;
3320 var selAfter = computeSelAfterChange(doc, change);
3321 addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);
3322
3323 makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));
3324 var rebased = [];
3325
3326 linkedDocs(doc, function(doc, sharedHist) {
3327 if (!sharedHist && indexOf(rebased, doc.history) == -1) {
3328 rebaseHist(doc.history, change);
3329 rebased.push(doc.history);
3330 }
3331 makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));
3332 });
3333 }
3334
3335 // Revert a change stored in a document's history.
3336 function makeChangeFromHistory(doc, type, allowSelectionOnly) {

Callers 1

makeChangeFunction · 0.85

Calls 7

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

Used in the wild real call sites across dependent graphs

searching dependent graphs…