(buf)
| 10 | // Fullscreen TUI outputs coordinate positioning (\x1b[row;colH) rather than \n. |
| 11 | // This splits the absolute escape stream into rows. |
| 12 | function splitRows(buf) { |
| 13 | return buf.split(/\x1b\[\d+;\d+H/).filter(l => l.length > 0); |
| 14 | } |
| 15 | |
| 16 | // Helper to mock stdout dimensions cleanly without boilerplate |
| 17 | function runWithMockStdout(columns, rows, fn) { |