Skip to content

Terminal left in raw mode after Ctrl+C during interactive task selection #305

@kazupon

Description

@kazupon

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

  1. Build: cargo build -p vite_task_bin --bin vt
  2. Run ./target/debug/vt run (no task specifier, so interactive selector appears)
  3. Press Ctrl+C to cancel
  4. Run any command (e.g., cargo --help)
  5. Observe garbled/staircase output
  6. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions