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

Function updateExternalMeasurement

src/codemirror.js:2579–2588  ·  view source on GitHub ↗
(cm, line)

Source from the content-addressed store, hash-verified

2577 // Render a line into the hidden node display.externalMeasured. Used
2578 // when measurement is needed for a line that's not in the viewport.
2579 function updateExternalMeasurement(cm, line) {
2580 line = visualLine(line);
2581 var lineN = lineNo(line);
2582 var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);
2583 view.lineN = lineN;
2584 var built = view.built = buildLineContent(cm, view);
2585 view.text = built.pre;
2586 removeChildrenAndAdd(cm.display.lineMeasure, built.pre);
2587 return view;
2588 }
2589
2590 // Get a {top, bottom, left, right} box (in line-local coordinates)
2591 // for a given character.

Callers 1

prepareMeasureForLineFunction · 0.85

Calls 4

visualLineFunction · 0.85
lineNoFunction · 0.85
buildLineContentFunction · 0.85
removeChildrenAndAddFunction · 0.85

Tested by

no test coverage detected