(cm)
| 346 | |
| 347 | // Find the longest line in the document. |
| 348 | function findMaxLine(cm) { |
| 349 | var d = cm.display, doc = cm.doc; |
| 350 | d.maxLine = getLine(doc, doc.first); |
| 351 | d.maxLineLength = lineLength(d.maxLine); |
| 352 | d.maxLineChanged = true; |
| 353 | doc.iter(function(line) { |
| 354 | var len = lineLength(line); |
| 355 | if (len > d.maxLineLength) { |
| 356 | d.maxLineLength = len; |
| 357 | d.maxLine = line; |
| 358 | } |
| 359 | }); |
| 360 | } |
| 361 | |
| 362 | // Make sure the gutters options contains the element |
| 363 | // "CodeMirror-linenumbers" when the lineNumbers option is true. |
no test coverage detected