only quit gitui on Ctrl+c from now on

This commit is contained in:
Stephan Dilly 2020-05-10 13:27:46 +02:00
parent d332e7e586
commit ec6180af51
3 changed files with 4 additions and 4 deletions

View file

@ -172,7 +172,7 @@ impl App {
flags.insert(NeedsUpdate::COMMANDS);
} else if let Event::Key(k) = ev {
let new_flags = match k {
keys::EXIT_1 | keys::EXIT_2 => {
keys::EXIT => {
self.do_quit = true;
NeedsUpdate::empty()
}

View file

@ -19,9 +19,9 @@ pub const FOCUS_WORKDIR: KeyEvent = no_mod(KeyCode::Char('1'));
pub const FOCUS_STAGE: KeyEvent = no_mod(KeyCode::Char('2'));
pub const FOCUS_RIGHT: KeyEvent = no_mod(KeyCode::Right);
pub const FOCUS_LEFT: KeyEvent = no_mod(KeyCode::Left);
pub const EXIT_1: KeyEvent = no_mod(KeyCode::Esc);
pub const EXIT: KeyEvent =
with_mod(KeyCode::Char('c'), KeyModifiers::CONTROL);
pub const EXIT_POPUP: KeyEvent = no_mod(KeyCode::Esc);
pub const EXIT_2: KeyEvent = no_mod(KeyCode::Char('q'));
pub const CLOSE_MSG: KeyEvent = no_mod(KeyCode::Enter);
pub const OPEN_COMMIT: KeyEvent = no_mod(KeyCode::Char('c'));
pub const OPEN_HELP: KeyEvent = no_mod(KeyCode::Char('h'));

View file

@ -136,7 +136,7 @@ pub mod commands {
);
///
pub static QUIT: CommandText = CommandText::new(
"Quit [esc,q]",
"Quit [ctrl+c]",
"quit gitui application",
CMD_GROUP_GENERAL,
);