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

Function markedSpansBefore

tools/pythonauto/static/codemirror/codemirror.js:4077–4089  ·  view source on GitHub ↗
(old, startCh, isInsert)

Source from the content-addressed store, hash-verified

4075 }
4076
4077 function markedSpansBefore(old, startCh, isInsert) {
4078 if (old) for (var i = 0, nw; i < old.length; ++i) {
4079 var span = old[i], marker = span.marker;
4080 var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);
4081 if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) {
4082 var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh);
4083 (nw || (nw = [])).push({from: span.from,
4084 to: endsAfter ? null : span.to,
4085 marker: marker});
4086 }
4087 }
4088 return nw;
4089 }
4090
4091 function markedSpansAfter(old, endCh, isInsert) {
4092 if (old) for (var i = 0, nw; i < old.length; ++i) {

Callers 1

stretchSpansOverChangeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected