MCPcopy
hub / github.com/csev/py4e / findMaxLine

Function findMaxLine

tools/pythonauto/static/codemirrorepl/codemirror.js:362–374  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

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

Callers 3

wrappingChangedFunction · 0.85
endOperationFunction · 0.85
attachDocFunction · 0.85

Calls 2

getLineFunction · 0.70
lineLengthFunction · 0.70

Tested by

no test coverage detected