(content: string)
| 117 | * very long line that wraps past 3 visual rows — acceptable, since the common |
| 118 | * case is multi-line output. */ |
| 119 | export function isOutputLineTruncated(content: string): boolean { |
| 120 | let pos = 0 |
| 121 | // Need more than MAX_LINES_TO_SHOW newlines (content fills > 3 lines). |
| 122 | // The +1 accounts for wrapText showing an extra line when remainingLines==1. |
| 123 | for (let i = 0; i <= MAX_LINES_TO_SHOW; i++) { |
| 124 | pos = content.indexOf('\n', pos) |
| 125 | if (pos === -1) return false |
| 126 | pos++ |
| 127 | } |
| 128 | // A trailing newline is a terminator, not a new line — match |
| 129 | // renderTruncatedContent's trimEnd() behavior. |
| 130 | return pos < content.length |
| 131 | } |
no outgoing calls
no test coverage detected