MCPcopy Index your code
hub / github.com/csev/py4e / makeChangeInner

Function makeChangeInner

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

Source from the content-addressed store, hash-verified

3280 }
3281
3282 function makeChangeInner(doc, change) {
3283 if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) return;
3284 var selAfter = computeSelAfterChange(doc, change);
3285 addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);
3286
3287 makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));
3288 var rebased = [];
3289
3290 linkedDocs(doc, function(doc, sharedHist) {
3291 if (!sharedHist && indexOf(rebased, doc.history) == -1) {
3292 rebaseHist(doc.history, change);
3293 rebased.push(doc.history);
3294 }
3295 makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));
3296 });
3297 }
3298
3299 // Revert a change stored in a document's history.
3300 function makeChangeFromHistory(doc, type, allowSelectionOnly) {

Callers 1

makeChangeFunction · 0.85

Calls 8

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

Tested by

no test coverage detected