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

Function buildViewArray

static/mergely/lib/codemirror.js:3225–3233  ·  view source on GitHub ↗
(cm, from, to)

Source from the content-addressed store, hash-verified

3223
3224 // Create a range of LineView objects for the given lines.
3225 function buildViewArray(cm, from, to) {
3226 var array = [], nextPos;
3227 for (var pos = from; pos < to; pos = nextPos) {
3228 var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);
3229 nextPos = pos + view.size;
3230 array.push(view);
3231 }
3232 return array;
3233 }
3234
3235 // Updates the display.view data structure for a given change to the
3236 // 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