MCPcopy
hub / github.com/csev/py4e / updateExternalMeasurement

Function updateExternalMeasurement

tools/pythonauto/static/codemirrorepl/codemirror.js:1487–1496  ·  view source on GitHub ↗
(cm, line)

Source from the content-addressed store, hash-verified

1485 // Render a line into the hidden node display.externalMeasured. Used
1486 // when measurement is needed for a line that's not in the viewport.
1487 function updateExternalMeasurement(cm, line) {
1488 line = visualLine(line);
1489 var lineN = lineNo(line);
1490 var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);
1491 view.lineN = lineN;
1492 var built = view.built = buildLineContent(cm, view);
1493 view.text = built.pre;
1494 removeChildrenAndAdd(cm.display.lineMeasure, built.pre);
1495 return view;
1496 }
1497
1498 // Get a {top, bottom, left, right} box (in line-local coordinates)
1499 // for a given character.

Callers 1

prepareMeasureForLineFunction · 0.85

Calls 4

visualLineFunction · 0.70
lineNoFunction · 0.70
buildLineContentFunction · 0.70
removeChildrenAndAddFunction · 0.70

Tested by

no test coverage detected