From e7359645dd9596575f476e771d68ced68a890e5a Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Thu, 16 Sep 2021 01:03:21 +0900 Subject: [PATCH] change commands help order --- src/app.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/app.rs b/src/app.rs index 5aa333f..c7c21a5 100644 --- a/src/app.rs +++ b/src/app.rs @@ -127,15 +127,15 @@ impl App { fn commands(&self) -> Vec { let mut res = vec![ + CommandInfo::new(command::filter(&self.config.key_config)), + CommandInfo::new(command::help(&self.config.key_config)), + CommandInfo::new(command::toggle_tabs(&self.config.key_config)), CommandInfo::new(command::scroll(&self.config.key_config)), CommandInfo::new(command::scroll_to_top_bottom(&self.config.key_config)), CommandInfo::new(command::scroll_up_down_multiple_lines( &self.config.key_config, )), CommandInfo::new(command::move_focus(&self.config.key_config)), - CommandInfo::new(command::filter(&self.config.key_config)), - CommandInfo::new(command::help(&self.config.key_config)), - CommandInfo::new(command::toggle_tabs(&self.config.key_config)), CommandInfo::new(command::extend_or_shorten_widget_width( &self.config.key_config, )), @@ -337,7 +337,9 @@ impl App { return Ok(EventState::Consumed); } - return Ok(state); + if state.is_consumed() { + return Ok(EventState::Consumed); + } } Focus::Table => { match self.tab.selected_tab {