[PR #6709] fix: disable SGR mouse tracking on exit to prevent ASCII codes #12055

Open
opened 2026-02-16 18:16:59 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6709

State: open
Merged: No


Problem: When users press CTRL+C in OpenCode TUI, the application exits without properly disabling mouse causes the terminal to continue tracking modes. This displaying SGR mouse tracking codes as ASCII strings when moving the mouse.

Solution: We now send mouse tracking disable escape sequences before destroying the renderer, covering all common mouse tracking protocols: basic, button events, SGR, SGR 1006, URXVT, and all motion tracking modes.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6709 **State:** open **Merged:** No --- **Problem:** When users press CTRL+C in OpenCode TUI, the application exits without properly disabling mouse causes the terminal to continue tracking modes. This displaying SGR mouse tracking codes as ASCII strings when moving the mouse. **Solution:** We now send mouse tracking disable escape sequences before destroying the renderer, covering all common mouse tracking protocols: basic, button events, SGR, SGR 1006, URXVT, and all motion tracking modes.
yindo added the pull-request label 2026-02-16 18:16:59 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12055