Skip to content

fix(tui): stop mouse codes leaking into Git Bash after exit - #195

Merged
its-janghoon merged 1 commit into
developfrom
fix/gitbash-terminal
Oct 28, 2026
Merged

its-janghoon merged 1 commit into
developfrom
fix/gitbash-terminal

Conversation

@its-janghoon

Copy link
Copy Markdown
Member

Git Bash (mintty, no pseudo console): Ctrl+C ends native programs at once, so opentui's exit handlers never run and mouse reporting (?1003/?1006) stays on in the shell. Every mouse move prints 35;x;yM (upstream opencode #6912, still open for Git Bash).

  • Mouse reporting off by default when MSYSTEM is set and the terminal is mintty or stdin is not a TTY. REDROB_FORCE_MOUSE=1 keeps it on.
  • bin/redrob writes a terminal reset when the child ends by signal or non-zero code on Windows.

Not tested on Windows. tui typecheck: no new errors (11 existing on develop).

In Git Bash (mintty, no pseudo console) Ctrl+C ends a native program at once,
so no exit handler runs and the shell is left with mouse reporting on. Every
mouse move then prints "35;x;yM".

- Mouse reporting is off by default in Git Bash (REDROB_FORCE_MOUSE=1 keeps it).
- The npm launcher resets terminal modes when the TUI ends abnormally on Windows.
@its-janghoon
its-janghoon merged commit a4b9aa4 into develop Oct 28, 2026
12 checks passed
@its-janghoon
its-janghoon deleted the fix/gitbash-terminal branch October 28, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant