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

Function conflictingCollapsedRange

tools/pythonauto/static/codemirror/codemirror.js:4251–4265  ·  view source on GitHub ↗
(doc, lineNo, from, to, marker)

Source from the content-addressed store, hash-verified

4249 function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false); }
4250
4251 function conflictingCollapsedRange(doc, lineNo, from, to, marker) {
4252 var line = getLine(doc, lineNo);
4253 var sps = sawCollapsedSpans && line.markedSpans;
4254 if (sps) for (var i = 0; i < sps.length; ++i) {
4255 var sp = sps[i];
4256 if (!sp.marker.collapsed) continue;
4257 var found = sp.marker.find(true);
4258 var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);
4259 var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);
4260 if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;
4261 if (fromCmp <= 0 && (cmp(found.to, from) || extraRight(sp.marker) - extraLeft(marker)) > 0 ||
4262 fromCmp >= 0 && (cmp(found.from, to) || extraLeft(sp.marker) - extraRight(marker)) < 0)
4263 return true;
4264 }
4265 }
4266
4267 function visualLine(doc, line) {
4268 var merged;

Callers 1

markTextFunction · 0.70

Calls 5

cmpFunction · 0.85
getLineFunction · 0.70
extraLeftFunction · 0.70
extraRightFunction · 0.70
findMethod · 0.45

Tested by

no test coverage detected