Skip to content

Commit

Permalink
only quit gitui on Ctrl+c from now on
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Dilly committed May 10, 2020
1 parent d332e7e commit ec6180a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
4 changes: 2 additions & 2 deletions src/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down
2 changes: 1 addition & 1 deletion src/strings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
Expand Down

0 comments on commit ec6180a

Please sign in to comment.