Skip to content

Commit ec6180a

Browse files
author
Stephan Dilly
committed
only quit gitui on Ctrl+c from now on
1 parent d332e7e commit ec6180a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ impl App {
172172
flags.insert(NeedsUpdate::COMMANDS);
173173
} else if let Event::Key(k) = ev {
174174
let new_flags = match k {
175-
keys::EXIT_1 | keys::EXIT_2 => {
175+
keys::EXIT => {
176176
self.do_quit = true;
177177
NeedsUpdate::empty()
178178
}

src/keys.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ pub const FOCUS_WORKDIR: KeyEvent = no_mod(KeyCode::Char('1'));
1919
pub const FOCUS_STAGE: KeyEvent = no_mod(KeyCode::Char('2'));
2020
pub const FOCUS_RIGHT: KeyEvent = no_mod(KeyCode::Right);
2121
pub const FOCUS_LEFT: KeyEvent = no_mod(KeyCode::Left);
22-
pub const EXIT_1: KeyEvent = no_mod(KeyCode::Esc);
22+
pub const EXIT: KeyEvent =
23+
with_mod(KeyCode::Char('c'), KeyModifiers::CONTROL);
2324
pub const EXIT_POPUP: KeyEvent = no_mod(KeyCode::Esc);
24-
pub const EXIT_2: KeyEvent = no_mod(KeyCode::Char('q'));
2525
pub const CLOSE_MSG: KeyEvent = no_mod(KeyCode::Enter);
2626
pub const OPEN_COMMIT: KeyEvent = no_mod(KeyCode::Char('c'));
2727
pub const OPEN_HELP: KeyEvent = no_mod(KeyCode::Char('h'));

src/strings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ pub mod commands {
136136
);
137137
///
138138
pub static QUIT: CommandText = CommandText::new(
139-
"Quit [esc,q]",
139+
"Quit [ctrl+c]",
140140
"quit gitui application",
141141
CMD_GROUP_GENERAL,
142142
);

0 commit comments

Comments
 (0)