(doc, change, from, to)
| 6668 | |
| 6669 | // Used to store marked span information in the history. |
| 6670 | function attachLocalSpans(doc, change, from, to) { |
| 6671 | var existing = change["spans_" + doc.id], n = 0; |
| 6672 | doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) { |
| 6673 | if (line.markedSpans) |
| 6674 | (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; |
| 6675 | ++n; |
| 6676 | }); |
| 6677 | } |
| 6678 | |
| 6679 | // When un/re-doing restores text containing marked spans, those |
| 6680 | // that have been explicitly cleared should not be restored. |
no outgoing calls
no test coverage detected