What happened?
When rendering/padding a line that exactly matches the terminal width, the terminal auto-wraps the cursor. A subsequent \r\n causes an unintended double-wrap, desynchronizing the physical cursor from TUI's hardwareCursorRow tracking. This causes subsequent differential rendering updates (like spinner frames or streamed text) to be drawn on incorrect rows, leading to repeated/duplicate rendering.
Steps to reproduce
- Run
pi -ne in a terminal.
- Ask the agent to output a long paragraph where a wrapped line matches the terminal width exactly.
- Observe duplicated loader/spinner lines (
Working...) and duplicate text lines.
Expected behavior
The terminal cursor should stay synchronized with TUI, and rendering should be clean without duplicate lines or indicator duplicates.
Version
0.80.6
What happened?
When rendering/padding a line that exactly matches the terminal width, the terminal auto-wraps the cursor. A subsequent
\r\ncauses an unintended double-wrap, desynchronizing the physical cursor from TUI'shardwareCursorRowtracking. This causes subsequent differential rendering updates (like spinner frames or streamed text) to be drawn on incorrect rows, leading to repeated/duplicate rendering.Steps to reproduce
pi -nein a terminal.Working...) and duplicate text lines.Expected behavior
The terminal cursor should stay synchronized with TUI, and rendering should be clean without duplicate lines or indicator duplicates.
Version
0.80.6