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

Function markedSpansAfter

tools/pythonauto/static/codemirror/codemirror.js:4091–4103  ·  view source on GitHub ↗
(old, endCh, isInsert)

Source from the content-addressed store, hash-verified

4089 }
4090
4091 function markedSpansAfter(old, endCh, isInsert) {
4092 if (old) for (var i = 0, nw; i < old.length; ++i) {
4093 var span = old[i], marker = span.marker;
4094 var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);
4095 if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) {
4096 var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);
4097 (nw || (nw = [])).push({from: startsBefore ? null : span.from - endCh,
4098 to: span.to == null ? null : span.to - endCh,
4099 marker: marker});
4100 }
4101 }
4102 return nw;
4103 }
4104
4105 function stretchSpansOverChange(doc, change) {
4106 var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;

Callers 1

stretchSpansOverChangeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected