MCPcopy
hub / github.com/witheve/Eve / findMaxLine

Function findMaxLine

src/codemirror.js:355–367  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

353
354 // Find the longest line in the document.
355 function findMaxLine(cm) {
356 var d = cm.display, doc = cm.doc;
357 d.maxLine = getLine(doc, doc.first);
358 d.maxLineLength = lineLength(d.maxLine);
359 d.maxLineChanged = true;
360 doc.iter(function(line) {
361 var len = lineLength(line);
362 if (len > d.maxLineLength) {
363 d.maxLineLength = len;
364 d.maxLine = line;
365 }
366 });
367 }
368
369 // Make sure the gutters options contains the element
370 // "CodeMirror-linenumbers" when the lineNumbers option is true.

Callers 3

wrappingChangedFunction · 0.85
endOperation_R1Function · 0.85
attachDocFunction · 0.85

Calls 2

getLineFunction · 0.85
lineLengthFunction · 0.85

Tested by

no test coverage detected