MCPcopy Index your code
hub / github.com/csev/py4e / buildViewArray

Function buildViewArray

tools/pythonauto/static/codemirrorepl/codemirror.js:2008–2016  ·  view source on GitHub ↗
(cm, from, to)

Source from the content-addressed store, hash-verified

2006
2007 // Create a range of LineView objects for the given lines.
2008 function buildViewArray(cm, from, to) {
2009 var array = [], nextPos;
2010 for (var pos = from; pos < to; pos = nextPos) {
2011 var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);
2012 nextPos = pos + view.size;
2013 array.push(view);
2014 }
2015 return array;
2016 }
2017
2018 // Updates the display.view data structure for a given change to the
2019 // document. From and to are in pre-change coordinates. Lendiff is

Callers 2

regChangeFunction · 0.85
adjustViewFunction · 0.85

Calls 1

getLineFunction · 0.70

Tested by

no test coverage detected