MCPcopy Create free account
hub / github.com/breck7/scroll / updateExternalMeasurement

Function updateExternalMeasurement

external/.scrollLibs.js:3624–3633  ·  view source on GitHub ↗
(cm, line)

Source from the content-addressed store, hash-verified

3622 // Render a line into the hidden node display.externalMeasured. Used
3623 // when measurement is needed for a line that's not in the viewport.
3624 function updateExternalMeasurement(cm, line) {
3625 line = visualLine(line)
3626 var lineN = lineNo(line)
3627 var view = (cm.display.externalMeasured = new LineView(cm.doc, line, lineN))
3628 view.lineN = lineN
3629 var built = (view.built = buildLineContent(cm, view))
3630 view.text = built.pre
3631 removeChildrenAndAdd(cm.display.lineMeasure, built.pre)
3632 return view
3633 }
3634
3635 // Get a {top, bottom, left, right} box (in line-local coordinates)
3636 // 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