MCPcopy Create free account
hub / github.com/breck7/scroll / getMarkedSpanFor

Function getMarkedSpanFor

external/.scrollLibs.js:1167–1176  ·  view source on GitHub ↗
(spans, marker)

Source from the content-addressed store, hash-verified

1165
1166 // Search an array of spans for a span matching the given marker.
1167 function getMarkedSpanFor(spans, marker) {
1168 if (spans) {
1169 for (var i = 0; i < spans.length; ++i) {
1170 var span = spans[i]
1171 if (span.marker == marker) {
1172 return span
1173 }
1174 }
1175 }
1176 }
1177 // Remove a span from an array, returning undefined if no spans are
1178 // left (we don't store arrays for lines without spans).
1179 function removeMarkedSpan(spans, span) {

Callers 3

stretchSpansOverChangeFunction · 0.85
lineIsHiddenInnerFunction · 0.85
.scrollLibs.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected