(cm)
| 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. |
no test coverage detected