(doc, change)
| 4819 | // Create a history change event from an updateDoc-style change |
| 4820 | // object. |
| 4821 | function historyChangeFromChange(doc, change) { |
| 4822 | var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)}; |
| 4823 | attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); |
| 4824 | linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true); |
| 4825 | return histChange |
| 4826 | } |
| 4827 | |
| 4828 | // Pop all selection events off the end of a history array. Stop at |
| 4829 | // a change event. |
no test coverage detected