Function
charInCellAt
(
screen: Screen,
x: number,
y: number,
)
Source from the content-addressed store, hash-verified
| 664 | } |
| 665 | |
| 666 | export function charInCellAt( |
| 667 | screen: Screen, |
| 668 | x: number, |
| 669 | y: number, |
| 670 | ): string | undefined { |
| 671 | if (x < 0 || y < 0 || x >= screen.width || y >= screen.height) |
| 672 | return undefined |
| 673 | const ci = (y * screen.width + x) << 1 |
| 674 | return screen.charPool.get(screen.cells[ci]!) |
| 675 | } |
| 676 | /** |
| 677 | * Set a cell, optionally creating a spacer for wide characters. |
| 678 | * |
Tested by
no test coverage detected