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

Function lineNo

tools/pythonauto/static/codemirror/codemirror.js:5242–5252  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

5240 }
5241
5242 function lineNo(line) {
5243 if (line.parent == null) return null;
5244 var cur = line.parent, no = indexOf(cur.lines, line);
5245 for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {
5246 for (var i = 0;; ++i) {
5247 if (chunk.children[i] == cur) break;
5248 no += chunk.children[i].chunkSize();
5249 }
5250 }
5251 return no + cur.first;
5252 }
5253
5254 function lineAtHeight(chunk, h) {
5255 var n = chunk.first;

Callers 6

updateDisplayInnerFunction · 0.70
changeLineFunction · 0.70
codemirror.jsFile · 0.70
getLineStylesFunction · 0.70
lineStartFunction · 0.70

Calls 1

indexOfFunction · 0.70

Tested by

no test coverage detected