(lines: string[], index: number, maxIndex = lines.length - 1)
| 1132 | } |
| 1133 | |
| 1134 | private getKittyImageReservedRows(lines: string[], index: number, maxIndex = lines.length - 1): number { |
| 1135 | const rows = extractKittyImageRows(lines[index] ?? ""); |
| 1136 | if (rows <= 1) return 1; |
| 1137 | |
| 1138 | const maxRows = Math.min(rows, maxIndex - index + 1, lines.length - index); |
| 1139 | let reservedRows = 1; |
| 1140 | while (reservedRows < maxRows) { |
| 1141 | const line = lines[index + reservedRows] ?? ""; |
| 1142 | if (isImageLine(line) || visibleWidth(line) > 0) break; |
| 1143 | reservedRows++; |
| 1144 | } |
| 1145 | return reservedRows; |
| 1146 | } |
| 1147 | |
| 1148 | private expandChangedRangeForKittyImages( |
| 1149 | firstChanged: number, |
no test coverage detected