* Count the number of lines in the old content (excluding "new" lines).
( diffLines: DiffLine[], startIdx: number, endIdx: number, )
| 346 | * Count the number of lines in the old content (excluding "new" lines). |
| 347 | */ |
| 348 | function countOldContentLines( |
| 349 | diffLines: DiffLine[], |
| 350 | startIdx: number, |
| 351 | endIdx: number, |
| 352 | ): number { |
| 353 | let count = 0; |
| 354 | for (let i = startIdx; i <= endIdx; i++) { |
| 355 | if (diffLines[i].type !== "new") { |
| 356 | count++; |
| 357 | } |
| 358 | } |
| 359 | return count; |
| 360 | } |
| 361 | |
| 362 | /** |
| 363 | * Process a changed area with a limited group size. |
no outgoing calls
no test coverage detected