MCPcopy Create free account
hub / github.com/sql-js/sql.js / buildViewArray

Function buildViewArray

GUI/codemirror/lib/codemirror.js:2022–2030  ·  view source on GitHub ↗
(cm, from, to)

Source from the content-addressed store, hash-verified

2020
2021 // Create a range of LineView objects for the given lines.
2022 function buildViewArray(cm, from, to) {
2023 var array = [], nextPos;
2024 for (var pos = from; pos < to; pos = nextPos) {
2025 var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);
2026 nextPos = pos + view.size;
2027 array.push(view);
2028 }
2029 return array;
2030 }
2031
2032 // Updates the display.view data structure for a given change to the
2033 // 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…