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

Function visualLineEndNo

tools/pythonauto/static/codemirrorepl/codemirror.js:5384–5391  ·  view source on GitHub ↗
(doc, lineN)

Source from the content-addressed store, hash-verified

5382 // Get the line number of the start of the next visual line after
5383 // the given line.
5384 function visualLineEndNo(doc, lineN) {
5385 if (lineN > doc.lastLine()) return lineN;
5386 var line = getLine(doc, lineN), merged;
5387 if (!lineIsHidden(doc, line)) return lineN;
5388 while (merged = collapsedSpanAtEnd(line))
5389 line = merged.find(1, true).line;
5390 return lineNo(line) + 1;
5391 }
5392
5393 // Compute whether a line is hidden. Lines count as hidden when they
5394 // are part of a visual line that starts with another line, or when

Callers 2

updateDisplayInnerFunction · 0.85
regChangeFunction · 0.85

Calls 5

getLineFunction · 0.70
lineIsHiddenFunction · 0.70
collapsedSpanAtEndFunction · 0.70
lineNoFunction · 0.70
findMethod · 0.45

Tested by

no test coverage detected