Skip to content

fix: restore terminal state on Ctrl+C during interactive task selection#306

Merged
branchseer merged 1 commit intovoidzero-dev:mainfrom
kazupon:fix/305
Mar 28, 2026
Merged

fix: restore terminal state on Ctrl+C during interactive task selection#306
branchseer merged 1 commit intovoidzero-dev:mainfrom
kazupon:fix/305

Conversation

@kazupon
Copy link
Copy Markdown
Contributor

@kazupon kazupon commented Mar 28, 2026

resolve #305

  • Replace std::process::exit(130) with a SelectResult::Cancelled return value so that RawModeGuard::drop() runs and disable_raw_mode() is called properly
  • Previously, pressing Ctrl+C during interactive task selection (vt run without a task specifier) left the terminal in raw mode (-opost), causing staircase rendering for all subsequent commands
  • Add CtrlC variant to the e2e WriteKey enum and an "interactive ctrl-c cancels" test to verify exit code 130

@branchseer
Copy link
Copy Markdown
Member

Thank you!

@branchseer branchseer merged commit c9da525 into voidzero-dev:main Mar 28, 2026
9 checks passed
@kazupon kazupon deleted the fix/305 branch March 28, 2026 15:43
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.

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

2 participants