MCPcopy Index your code
hub / github.com/csev/py4e / computeMaxLength

Function computeMaxLength

tools/pythonauto/static/codemirror/codemirror.js:302–314  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

300 }
301
302 function computeMaxLength(cm) {
303 var d = cm.display, doc = cm.doc;
304 d.maxLine = getLine(doc, doc.first);
305 d.maxLineLength = lineLength(doc, d.maxLine);
306 d.maxLineChanged = true;
307 doc.iter(function(line) {
308 var len = lineLength(doc, line);
309 if (len > d.maxLineLength) {
310 d.maxLineLength = len;
311 d.maxLine = line;
312 }
313 });
314 }
315
316 // Make sure the gutters options contains the element
317 // "CodeMirror-linenumbers" when the lineNumbers option is true.

Callers 3

wrappingChangedFunction · 0.70
endOperationFunction · 0.70
attachDocFunction · 0.70

Calls 2

getLineFunction · 0.70
lineLengthFunction · 0.70

Tested by

no test coverage detected