MCPcopy
hub / github.com/tilemill-project/tilemill / findMaxLine

Function findMaxLine

assets/js/codemirror.js:354–366  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

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