MCPcopy Create free account
hub / github.com/TextGeneratorio/text-generator.io / findMaxLine

Function findMaxLine

static/libs/codemirror.js:888–900  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

886
887// Find the longest line in the document.
888function findMaxLine(cm) {
889 var d = cm.display, doc = cm.doc;
890 d.maxLine = getLine(doc, doc.first);
891 d.maxLineLength = lineLength(d.maxLine);
892 d.maxLineChanged = true;
893 doc.iter(function (line) {
894 var len = lineLength(line);
895 if (len > d.maxLineLength) {
896 d.maxLineLength = len;
897 d.maxLine = line;
898 }
899 });
900}
901
902// BIDI HELPERS
903

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