MCPcopy Create free account
hub / github.com/csev/py4e / makeChangeNoReadonly

Function makeChangeNoReadonly

tools/pythonauto/static/codemirror/codemirror.js:2376–2391  ·  view source on GitHub ↗
(doc, change, selUpdate)

Source from the content-addressed store, hash-verified

2374 }
2375
2376 function makeChangeNoReadonly(doc, change, selUpdate) {
2377 if (change.text.length == 1 && change.text[0] == "" && posEq(change.from, change.to)) return;
2378 var selAfter = computeSelAfterChange(doc, change, selUpdate);
2379 addToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);
2380
2381 makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));
2382 var rebased = [];
2383
2384 linkedDocs(doc, function(doc, sharedHist) {
2385 if (!sharedHist && indexOf(rebased, doc.history) == -1) {
2386 rebaseHist(doc.history, change);
2387 rebased.push(doc.history);
2388 }
2389 makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));
2390 });
2391 }
2392
2393 function makeChangeFromHistory(doc, type) {
2394 if (doc.cm && doc.cm.state.suppressEdits) return;

Callers 1

makeChangeFunction · 0.85

Calls 8

addToHistoryFunction · 0.85
posEqFunction · 0.70
computeSelAfterChangeFunction · 0.70
makeChangeSingleDocFunction · 0.70
stretchSpansOverChangeFunction · 0.70
linkedDocsFunction · 0.70
indexOfFunction · 0.70
rebaseHistFunction · 0.70

Tested by

no test coverage detected