MCPcopy Create free account
hub / github.com/TruthHun/BookStack / visualLineEndNo

Function visualLineEndNo

static/mergely/lib/codemirror.js:6593–6600  ·  view source on GitHub ↗
(doc, lineN)

Source from the content-addressed store, hash-verified

6591 // Get the line number of the start of the next visual line after
6592 // the given line.
6593 function visualLineEndNo(doc, lineN) {
6594 if (lineN > doc.lastLine()) return lineN;
6595 var line = getLine(doc, lineN), merged;
6596 if (!lineIsHidden(doc, line)) return lineN;
6597 while (merged = collapsedSpanAtEnd(line))
6598 line = merged.find(1, true).line;
6599 return lineNo(line) + 1;
6600 }
6601
6602 // Compute whether a line is hidden. Lines count as hidden when they
6603 // are part of a visual line that starts with another line, or when

Callers 2

updateDisplayIfNeededFunction · 0.70
regChangeFunction · 0.70

Calls 4

getLineFunction · 0.70
lineIsHiddenFunction · 0.70
collapsedSpanAtEndFunction · 0.70
lineNoFunction · 0.70

Tested by

no test coverage detected