(screen: Screen, cell: Cell)
| 466 | * Check if a Cell (view object) represents an empty cell. |
| 467 | */ |
| 468 | export function isCellEmpty(screen: Screen, cell: Cell): boolean { |
| 469 | // Check if cell looks like an empty cell (space, empty style, narrow, no link). |
| 470 | // Note: After cellAt mapping, unwritten cells have emptyStyleId, so this |
| 471 | // returns true for both unwritten AND cleared cells. Use isEmptyCellAt |
| 472 | // for the internal distinction. |
| 473 | return ( |
| 474 | cell.char === ' ' && |
| 475 | cell.styleId === screen.emptyStyleId && |
| 476 | cell.width === CellWidth.Narrow && |
| 477 | !cell.hyperlink |
| 478 | ) |
| 479 | } |
| 480 | // Intern a hyperlink string and return its ID (0 = no hyperlink) |
| 481 | function internHyperlink(screen: Screen, hyperlink: Hyperlink): number { |
| 482 | return screen.hyperlinkPool.intern(hyperlink) |
nothing calls this directly
no outgoing calls
no test coverage detected