(doc, lineN)
| 6591 | // Get the line number of the start of the next visual line after |
| 6592 | // the given line. |
| 6593 | function visualLineEndNo(doc, lineN) { |
| 6594 | if (lineN > doc.lastLine()) return lineN; |
| 6595 | var line = getLine(doc, lineN), merged; |
| 6596 | if (!lineIsHidden(doc, line)) return lineN; |
| 6597 | while (merged = collapsedSpanAtEnd(line)) |
| 6598 | line = merged.find(1, true).line; |
| 6599 | return lineNo(line) + 1; |
| 6600 | } |
| 6601 | |
| 6602 | // Compute whether a line is hidden. Lines count as hidden when they |
| 6603 | // are part of a visual line that starts with another line, or when |
no test coverage detected