MCPcopy Create free account
hub / github.com/sql-js/sql.js / findViewForLine

Function findViewForLine

GUI/codemirror/lib/codemirror.js:1521–1527  ·  view source on GitHub ↗
(cm, lineN)

Source from the content-addressed store, hash-verified

1519
1520 // Find a line view that corresponds to the given line number.
1521 function findViewForLine(cm, lineN) {
1522 if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)
1523 return cm.display.view[findViewIndex(cm, lineN)];
1524 var ext = cm.display.externalMeasured;
1525 if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)
1526 return ext;
1527 }
1528
1529 // Measurement can be split in two steps, the set-up work that
1530 // applies to the whole line, and the measurement of the actual

Callers 2

prepareMeasureForLineFunction · 0.85
codemirror.jsFile · 0.85

Calls 1

findViewIndexFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…