* Emit additions for a row that only exists in next (height grew). * Skips empty/unwritten cells.
( nextCells: Int32Array, next: Screen, ci: number, y: number, startX: number, endX: number, nextCell: Cell, cb: DiffCallback, )
| 1281 | * Skips empty/unwritten cells. |
| 1282 | */ |
| 1283 | function diffRowAdded( |
| 1284 | nextCells: Int32Array, |
| 1285 | next: Screen, |
| 1286 | ci: number, |
| 1287 | y: number, |
| 1288 | startX: number, |
| 1289 | endX: number, |
| 1290 | nextCell: Cell, |
| 1291 | cb: DiffCallback, |
| 1292 | ): boolean { |
| 1293 | for (let x = startX; x < endX; x++, ci += 2) { |
| 1294 | if (nextCells[ci] === 0 && nextCells[ci | 1] === 0) continue |
| 1295 | cellAtCI(next, ci, nextCell) |
| 1296 | if (cb(x, y, undefined, nextCell)) return true |
| 1297 | } |
| 1298 | return false |
| 1299 | } |
| 1300 | |
| 1301 | /** |
| 1302 | * Diff two screens with identical width. |
no test coverage detected