* Helper to get line content directly from viewport
(term: Terminal, y: number)
| 1663 | * Helper to get line content directly from viewport |
| 1664 | */ |
| 1665 | function getViewportLineContent(term: Terminal, y: number): string { |
| 1666 | const viewport = term.wasmTerm?.getViewport(); |
| 1667 | if (!viewport) return ''; |
| 1668 | const cols = term.cols; |
| 1669 | const start = y * cols; |
| 1670 | return viewport |
| 1671 | .slice(start, start + cols) |
| 1672 | .map((c) => String.fromCodePoint(c.codepoint || 32)) |
| 1673 | .join('') |
| 1674 | .trimEnd(); |
| 1675 | } |
| 1676 | |
| 1677 | test('BUG REPRO: getLine and getViewport should return same data after partial updates', async () => { |
| 1678 | const term = await createIsolatedTerminal({ cols: 80, rows: 24 }); |
no test coverage detected
searching dependent graphs…