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