MCPcopy Create free account
hub / github.com/breck7/scroll / makeChangeInner

Function makeChangeInner

external/.scrollLibs.js:7168–7185  ·  view source on GitHub ↗
(doc, change)

Source from the content-addressed store, hash-verified

7166 }
7167
7168 function makeChangeInner(doc, change) {
7169 if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) {
7170 return
7171 }
7172 var selAfter = computeSelAfterChange(doc, change)
7173 addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN)
7174
7175 makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change))
7176 var rebased = []
7177
7178 linkedDocs(doc, function (doc, sharedHist) {
7179 if (!sharedHist && indexOf(rebased, doc.history) == -1) {
7180 rebaseHist(doc.history, change)
7181 rebased.push(doc.history)
7182 }
7183 makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change))
7184 })
7185 }
7186
7187 // Revert a change stored in a document's history.
7188 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