Describe the bug
When the CLI exits, my terminal can't scroll with the mouse anymore.
I used copilot to diagnose itself (yay).
The problem appears to be that while the CLI turns on mouse tracking:
ESC[?1049h alt screen on
ESC[?1002h mouse button-event tracking on
ESC[?1006h SGR mouse mode on
The way it turns off leaves my terminal emulator (foot) in a bad place where it cannot scroll anymore:
ESC[?1049l alt screen off
ESC[?2004l
ESC[?1004l
ESC[?1006l mouse off
ESC[?1003l
ESC[?1002l
I'm pretty sure that these events need to be done in a stack order, where the alt screen is turned off last because it was turned on first.
This appears to be a regression in 1.0.49-2 and above.
Affected version
1.0.63
Steps to reproduce the behavior
- Run copilot CLI
- Get enough text to need to scroll
- Test scrolling; it works
- Ctrl+D to exit
- Run
git log
- Try to scroll it
Expected behavior
My terminal can still scroll.
Additional context
- Terminal emulator: foot
- Shell: zsh
Describe the bug
When the CLI exits, my terminal can't scroll with the mouse anymore.
I used copilot to diagnose itself (yay).
The problem appears to be that while the CLI turns on mouse tracking:
The way it turns off leaves my terminal emulator (foot) in a bad place where it cannot scroll anymore:
I'm pretty sure that these events need to be done in a stack order, where the alt screen is turned off last because it was turned on first.
This appears to be a regression in 1.0.49-2 and above.
Affected version
1.0.63
Steps to reproduce the behavior
git logExpected behavior
My terminal can still scroll.
Additional context