(line, ch)
| 1447 | } |
| 1448 | |
| 1449 | function collapsedSpanAround(line, ch) { |
| 1450 | var sps = sawCollapsedSpans && line.markedSpans, |
| 1451 | found |
| 1452 | if (sps) { |
| 1453 | for (var i = 0; i < sps.length; ++i) { |
| 1454 | var sp = sps[i] |
| 1455 | if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) && (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { |
| 1456 | found = sp.marker |
| 1457 | } |
| 1458 | } |
| 1459 | } |
| 1460 | return found |
| 1461 | } |
| 1462 | |
| 1463 | // Test whether there exists a collapsed span that partially |
| 1464 | // overlaps (covers the start or end, but not both) of a new span. |
no test coverage detected