(cm)
| 368 | |
| 369 | // Find the longest line in the document. |
| 370 | export function findMaxLine(cm) { |
| 371 | let d = cm.display, doc = cm.doc |
| 372 | d.maxLine = getLine(doc, doc.first) |
| 373 | d.maxLineLength = lineLength(d.maxLine) |
| 374 | d.maxLineChanged = true |
| 375 | doc.iter(line => { |
| 376 | let len = lineLength(line) |
| 377 | if (len > d.maxLineLength) { |
| 378 | d.maxLineLength = len |
| 379 | d.maxLine = line |
| 380 | } |
| 381 | }) |
| 382 | } |
no test coverage detected