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

Function findViewForLine

tools/pythonauto/static/codemirrorepl/codemirror.js:1505–1511  ·  view source on GitHub ↗
(cm, lineN)

Source from the content-addressed store, hash-verified

1503
1504 // Find a line view that corresponds to the given line number.
1505 function findViewForLine(cm, lineN) {
1506 if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)
1507 return cm.display.view[findViewIndex(cm, lineN)];
1508 var ext = cm.display.externalMeasured;
1509 if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)
1510 return ext;
1511 }
1512
1513 // Measurement can be split in two steps, the set-up work that
1514 // 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