mirror of
https://github.com/donlucasx/xscapes.git
synced 2026-10-20 08:43:32 +02:00
DECSTBM homes the cursor, and a parameterless ESC[r is still DECSTBM. The exit path put the cursor below the band and then reset the region once more from a deferred call, which pulled it back to row 1; zsh's prompt redraw begins with ESC[J, so from there it erased everything the agent had drawn. Every exit blanked the screen and lost the agent's last output. LeaveTo places the cursor after the last region change, and one sync.Once exit path replaces the two that were racing. Verified in a real terminal: the agent's output stays on row 1, the scape rows are cleared, and the shell's prompt lands below the band with echo and line editing back.