* Write cell data into an existing Cell object to avoid allocation. * Caller must ensure index is valid.
(screen: Screen, ci: number, out: Cell)
| 881 | * Caller must ensure index is valid. |
| 882 | */ |
| 883 | function cellAtCI(screen: Screen, ci: number, out: Cell): void { |
| 884 | const w1 = ci | 1 |
| 885 | const word1 = screen.cells[w1]! |
| 886 | out.char = screen.charPool.get(screen.cells[ci]!) |
| 887 | out.styleId = word1 >>> STYLE_SHIFT |
| 888 | out.width = word1 & WIDTH_MASK |
| 889 | const hid = (word1 >>> HYPERLINK_SHIFT) & HYPERLINK_MASK |
| 890 | out.hyperlink = hid === 0 ? undefined : screen.hyperlinkPool.get(hid) |
| 891 | } |
| 892 | |
| 893 | export function charInCellAt( |
| 894 | screen: Screen, |
no test coverage detected