(doc, change)
| 70 | } |
| 71 | |
| 72 | function makeChangeInner(doc, change) { |
| 73 | if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) return |
| 74 | let selAfter = computeSelAfterChange(doc, change) |
| 75 | addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN) |
| 76 | |
| 77 | makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change)) |
| 78 | let rebased = [] |
| 79 | |
| 80 | linkedDocs(doc, (doc, sharedHist) => { |
| 81 | if (!sharedHist && indexOf(rebased, doc.history) == -1) { |
| 82 | rebaseHist(doc.history, change) |
| 83 | rebased.push(doc.history) |
| 84 | } |
| 85 | makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change)) |
| 86 | }) |
| 87 | } |
| 88 | |
| 89 | // Revert a change stored in a document's history. |
| 90 | export function makeChangeFromHistory(doc, type, allowSelectionOnly) { |
no test coverage detected