When running vt run without a task specifier (interactive task selection mode), pressing Ctrl+C leaves the terminal in raw mode. This causes all subsequent terminal output (including other commands like cargo --help) to render with a "staircase" effect, where each new line starts at the horizontal position where the previous line ended.
Steps to Reproduce
- Build:
cargo build -p vite_task_bin --bin vt
- Run
./target/debug/vt run (no task specifier, so interactive selector appears)
- Press Ctrl+C to cancel
- Run any command (e.g.,
cargo --help)
- Observe garbled/staircase output
- Run
stty opost to restore terminal (workaround)
Expected Behavior
Terminal should be fully restored to its original state after Ctrl+C, with disable_raw_mode() called before process exit.