MCPcopy
hub / github.com/witheve/Eve / collapsedSpanAtSide

Function collapsedSpanAtSide

src/codemirror.js:6555–6564  ·  view source on GitHub ↗
(line, start)

Source from the content-addressed store, hash-verified

6553 // Find out whether a line ends or starts in a collapsed span. If
6554 // so, return the marker for that span.
6555 function collapsedSpanAtSide(line, start) {
6556 var sps = sawCollapsedSpans && line.markedSpans, found;
6557 if (sps) for (var sp, i = 0; i < sps.length; ++i) {
6558 sp = sps[i];
6559 if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&
6560 (!found || compareCollapsedMarkers(found, sp.marker) < 0))
6561 found = sp.marker;
6562 }
6563 return found;
6564 }
6565 function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true); }
6566 function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false); }
6567

Callers 2

collapsedSpanAtStartFunction · 0.85
collapsedSpanAtEndFunction · 0.85

Calls 1

compareCollapsedMarkersFunction · 0.85

Tested by

no test coverage detected