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

Function buildViewArray

src/codemirror.js:3246–3254  ·  view source on GitHub ↗
(cm, from, to)

Source from the content-addressed store, hash-verified

3244
3245 // Create a range of LineView objects for the given lines.
3246 function buildViewArray(cm, from, to) {
3247 var array = [], nextPos;
3248 for (var pos = from; pos < to; pos = nextPos) {
3249 var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);
3250 nextPos = pos + view.size;
3251 array.push(view);
3252 }
3253 return array;
3254 }
3255
3256 // Updates the display.view data structure for a given change to the
3257 // document. From and to are in pre-change coordinates. Lendiff is

Callers 2

regChangeFunction · 0.85
adjustViewFunction · 0.85

Calls 1

getLineFunction · 0.85

Tested by

no test coverage detected