MCPcopy
hub / github.com/witheve/Eve / findViewForLine

Function findViewForLine

src/codemirror.js:2597–2603  ·  view source on GitHub ↗
(cm, lineN)

Source from the content-addressed store, hash-verified

2595
2596 // Find a line view that corresponds to the given line number.
2597 function findViewForLine(cm, lineN) {
2598 if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)
2599 return cm.display.view[findViewIndex(cm, lineN)];
2600 var ext = cm.display.externalMeasured;
2601 if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)
2602 return ext;
2603 }
2604
2605 // Measurement can be split in two steps, the set-up work that
2606 // applies to the whole line, and the measurement of the actual

Callers 3

posToDOMFunction · 0.85
prepareMeasureForLineFunction · 0.85
codemirror.jsFile · 0.85

Calls 1

findViewIndexFunction · 0.85

Tested by

no test coverage detected