Skip to content

Fix Ctrl+C not quitting from all app modes#15

Merged
huseyinbabal merged 3 commits intomasterfrom
fix/ctrl-c-quit
Jan 16, 2026
Merged

Fix Ctrl+C not quitting from all app modes#15
huseyinbabal merged 3 commits intomasterfrom
fix/ctrl-c-quit

Conversation

@huseyinbabal
Copy link
Copy Markdown
Owner

@huseyinbabal huseyinbabal commented Jan 16, 2026

Closes #14

Summary

  • Moves Ctrl+C handler to the global event loop so it works from any mode
  • Previously Ctrl+C only worked in Normal mode, leaving users stuck in Help, Command, Projects, Zones, Confirm, Warning, or Describe modes

Changes

  • Added global Ctrl+C check in run_app() before mode-specific handling
  • Removed duplicate Ctrl+C handling from handle_normal_mode()

Previously, Ctrl+C was only handled in Normal mode, so users couldn't
quit the app using Ctrl+C while in Help, Command, Projects, Zones,
Confirm, Warning, or Describe modes.

Move the Ctrl+C handler to the global event loop so it works regardless
of the current app mode.
- Add permissions block to pr-check.yml for security scanning
- Add stale-branch.yml to auto-delete merged branches
@github-advanced-security
Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

- Fix deprecated ratatui methods: size() -> area(), highlight_style() -> row_highlight_style()
- Fix clippy warnings: use next_back() instead of last() on DoubleEndedIterator
- Fix clippy warnings: use strip_prefix() instead of manual prefix stripping
- Fix clippy warnings: use div_ceil() instead of manual implementation
- Fix clippy warnings: use ? operator instead of if-let-else
- Fix clippy warnings: remove redundant closure
- Fix clippy warnings: use collapsible str::replace
- Add #[allow(dead_code)] for unused but potentially useful code
@huseyinbabal huseyinbabal merged commit b5cca8c into master Jan 16, 2026
6 of 7 checks passed
@huseyinbabal huseyinbabal deleted the fix/ctrl-c-quit branch January 16, 2026 09:01
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.

ctrl+c is not working

2 participants