MCPcopy Create free account
hub / github.com/sql-js/sql.js / findMaxLine

Function findMaxLine

GUI/codemirror/lib/codemirror.js:361–373  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

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

Callers 3

wrappingChangedFunction · 0.85
endOperationFunction · 0.85
attachDocFunction · 0.85

Calls 2

getLineFunction · 0.85
lineLengthFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…