MCPcopy Index your code
hub / github.com/csev/py4e / attachLocalSpans

Function attachLocalSpans

tools/pythonauto/static/codemirrorepl/codemirror.js:6670–6677  ·  view source on GitHub ↗
(doc, change, from, to)

Source from the content-addressed store, hash-verified

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.

Callers 1

historyChangeFromChangeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected