mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 01:18:21 +00:00
run rustfmt and fix vim style key config test failure
This commit is contained in:
parent
f29ba723df
commit
aee872113b
2 changed files with 10 additions and 5 deletions
14
src/app.rs
14
src/app.rs
|
|
@ -261,7 +261,8 @@ impl App {
|
|||
log::trace!("event: {:?}", ev);
|
||||
|
||||
if let InputEvent::Input(ev) = ev {
|
||||
if self.check_quit_key(ev) || self.check_weak_quit_key(ev) {
|
||||
if self.check_quit_key(ev) || self.check_weak_quit_key(ev)
|
||||
{
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
|
|
@ -451,12 +452,15 @@ impl App {
|
|||
msg
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
fn check_weak_quit_key(&mut self, ev: Event) -> bool {
|
||||
if self.any_popup_visible() { return false }
|
||||
if self.any_popup_visible() {
|
||||
return false;
|
||||
}
|
||||
if let Event::Key(e) = ev {
|
||||
if e == self.key_config.exit_if_no_popup ||
|
||||
e == self.key_config.exit_popup {
|
||||
if e == self.key_config.exit_if_no_popup
|
||||
|| e == self.key_config.exit_popup
|
||||
{
|
||||
self.do_quit = true;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
open_help: ( code: F(1), modifiers: ( bits: 0,),),
|
||||
|
||||
exit: ( code: Char('Q'), modifiers: ( bits: 1,),),
|
||||
exit_if_no_popup: ( code: Char('q'), modifiers: ( bits: 0,),),
|
||||
exit_popup: ( code: Esc, modifiers: ( bits: 0,),),
|
||||
|
||||
open_commit: ( code: Char('c'), modifiers: ( bits: 0,),),
|
||||
|
|
|
|||
Loading…
Reference in a new issue