MCPcopy Index your code
hub / github.com/ronreiter/interactive-tutorials / getLine

Function getLine

static/js/codemirror/codemirror.js:4559–4569  ·  view source on GitHub ↗
(chunk, n)

Source from the content-addressed store, hash-verified

4557 // LINE UTILITIES
4558
4559 function getLine(chunk, n) {
4560 n -= chunk.first;
4561 while (!chunk.lines) {
4562 for (var i = 0;; ++i) {
4563 var child = chunk.children[i], sz = child.chunkSize();
4564 if (n < sz) { chunk = child; break; }
4565 n -= sz;
4566 }
4567 }
4568 return chunk.lines[n];
4569 }
4570
4571 function getBetween(doc, start, end) {
4572 var out = [], n = start.line;

Callers 15

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

Calls

no outgoing calls

Tested by

no test coverage detected