(doc, change, from, to)
| 4938 | |
| 4939 | // Used to store marked span information in the history. |
| 4940 | function attachLocalSpans(doc, change, from, to) { |
| 4941 | var existing = change["spans_" + doc.id], n = 0; |
| 4942 | doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) { |
| 4943 | if (line.markedSpans) |
| 4944 | { (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; } |
| 4945 | ++n; |
| 4946 | }); |
| 4947 | } |
| 4948 | |
| 4949 | // When un/re-doing restores text containing marked spans, those |
| 4950 | // that have been explicitly cleared should not be restored. |
no outgoing calls
no test coverage detected