* Write cell data into an existing Cell object to avoid allocation. * Caller must ensure index is valid.
(screen: Screen, ci: number, out: Cell)
| 654 | * Caller must ensure index is valid. |
| 655 | */ |
| 656 | function cellAtCI(screen: Screen, ci: number, out: Cell): void { |
| 657 | const w1 = ci | 1 |
| 658 | const word1 = screen.cells[w1]! |
| 659 | out.char = screen.charPool.get(screen.cells[ci]!) |
| 660 | out.styleId = word1 >>> STYLE_SHIFT |
| 661 | out.width = word1 & WIDTH_MASK |
| 662 | const hid = (word1 >>> HYPERLINK_SHIFT) & HYPERLINK_MASK |
| 663 | out.hyperlink = hid === 0 ? undefined : screen.hyperlinkPool.get(hid) |
| 664 | } |
| 665 | |
| 666 | export function charInCellAt( |
| 667 | screen: Screen, |
no test coverage detected