(chunk: string)
| 212 | } |
| 213 | |
| 214 | function onText(chunk: string): void { |
| 215 | rawText += chunk |
| 216 | visibleText = normalizePtyVisibleText(rawText) |
| 217 | |
| 218 | const cursorQueries = chunk.match(/\x1b\[6n/g)?.length || 0 |
| 219 | for (let index = 0; index < cursorQueries; index += 1) { |
| 220 | proc.stdin.write('\x1b[1;1R') |
| 221 | } |
| 222 | |
| 223 | maybeResolveWaiters() |
| 224 | } |
| 225 | |
| 226 | const stdoutDone = drainStream(proc.stdout, onText) |
| 227 | const stderrDone = drainStream(proc.stderr, onText) |
nothing calls this directly
no test coverage detected