MCPcopy Create free account
hub / github.com/feiyu563/PrometheusAlert / attachLocalSpans

Function attachLocalSpans

static/plugins/codemirror/codemirror.js:4983–4990  ·  view source on GitHub ↗
(doc, change, from, to)

Source from the content-addressed store, hash-verified

4981
4982 // Used to store marked span information in the history.
4983 function attachLocalSpans(doc, change, from, to) {
4984 var existing = change["spans_" + doc.id], n = 0;
4985 doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) {
4986 if (line.markedSpans)
4987 { (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; }
4988 ++n;
4989 });
4990 }
4991
4992 // When un/re-doing restores text containing marked spans, those
4993 // that have been explicitly cleared should not be restored.

Callers 1

historyChangeFromChangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected