MCPcopy
hub / github.com/csev/py4e / getLine

Function getLine

tools/pythonauto/static/codemirror/codemirror.js:5208–5218  ·  view source on GitHub ↗
(chunk, n)

Source from the content-addressed store, hash-verified

5206 // LINE UTILITIES
5207
5208 function getLine(chunk, n) {
5209 n -= chunk.first;
5210 while (!chunk.lines) {
5211 for (var i = 0;; ++i) {
5212 var child = chunk.children[i], sz = child.chunkSize();
5213 if (n < sz) { chunk = child; break; }
5214 n -= sz;
5215 }
5216 }
5217 return chunk.lines[n];
5218 }
5219
5220 function getBetween(doc, start, end) {
5221 var out = [], n = start.line;

Callers 15

lineLengthFunction · 0.70
computeMaxLengthFunction · 0.70
updateDisplayInnerFunction · 0.70
updateViewOffsetFunction · 0.70
drawForLineFunction · 0.70
updateSelectionRangeFunction · 0.70
findStartLineFunction · 0.70
getStateBeforeFunction · 0.70
charCoordsFunction · 0.70
cursorCoordsFunction · 0.70
coordsCharFunction · 0.70
readInputFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected