add `ctrl + c` exiting

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
This commit is contained in:
nyx 2024-10-07 18:52:23 -04:00
parent 596467f155
commit aa9850766b
No known key found for this signature in database
GPG Key ID: 6038FFD6589902CB

View File

@ -418,6 +418,12 @@ impl AppState {
return false; return false;
} }
if matches!(self.focus, Focus::ConfirmationPrompt(_))
&& (key.modifiers.contains(KeyModifiers::CONTROL) && key.code == KeyCode::Char('c'))
{
return false;
}
// If UI is not drawable returning true will mark as the key handled // If UI is not drawable returning true will mark as the key handled
if !self.drawable { if !self.drawable {
return true; return true;