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

Function attachLocalSpans

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

Source from the content-addressed store, hash-verified

5312 }
5313
5314 function attachLocalSpans(doc, change, from, to) {
5315 var existing = change["spans_" + doc.id], n = 0;
5316 doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) {
5317 if (line.markedSpans)
5318 (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans;
5319 ++n;
5320 });
5321 }
5322
5323 function historyChangeFromChange(doc, change) {
5324 var from = { line: change.from.line, ch: change.from.ch };

Callers 1

historyChangeFromChangeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected