MCPcopy Create free account
hub / github.com/breck7/scroll / findMaxLine

Function findMaxLine

external/.scrollLibs.js:1642–1655  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

1640
1641 // Find the longest line in the document.
1642 function findMaxLine(cm) {
1643 var d = cm.display,
1644 doc = cm.doc
1645 d.maxLine = getLine(doc, doc.first)
1646 d.maxLineLength = lineLength(d.maxLine)
1647 d.maxLineChanged = true
1648 doc.iter(function (line) {
1649 var len = lineLength(line)
1650 if (len > d.maxLineLength) {
1651 d.maxLineLength = len
1652 d.maxLine = line
1653 }
1654 })
1655 }
1656
1657 // BIDI HELPERS
1658

Callers 3

endOperation_R1Function · 0.85
attachDocFunction · 0.85
wrappingChangedFunction · 0.85

Calls 2

getLineFunction · 0.85
lineLengthFunction · 0.85

Tested by

no test coverage detected