MCPcopy Create free account
hub / github.com/TruthHun/BookStack / buildViewArray

Function buildViewArray

static/editor.md/lib/codemirror/lib/codemirror.js:3116–3124  ·  view source on GitHub ↗
(cm, from, to)

Source from the content-addressed store, hash-verified

3114
3115 // Create a range of LineView objects for the given lines.
3116 function buildViewArray(cm, from, to) {
3117 var array = [], nextPos;
3118 for (var pos = from; pos < to; pos = nextPos) {
3119 var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);
3120 nextPos = pos + view.size;
3121 array.push(view);
3122 }
3123 return array;
3124 }
3125
3126 // Updates the display.view data structure for a given change to the
3127 // document. From and to are in pre-change coordinates. Lendiff is

Callers 2

regChangeFunction · 0.70
adjustViewFunction · 0.70

Calls 1

getLineFunction · 0.70

Tested by

no test coverage detected