Fixed issue with HJKL keys interfering with search widget. Oops!

This commit is contained in:
ClementTsang 2020-02-15 17:34:59 -05:00
parent 470e431e55
commit 05acba2f47
3 changed files with 7 additions and 4 deletions

View File

@ -653,6 +653,10 @@ impl App {
'?' => {
self.help_dialog_state.is_showing_help = true;
}
'H' => self.move_widget_selection_left(),
'L' => self.move_widget_selection_right(),
'K' => self.move_widget_selection_up(),
'J' => self.move_widget_selection_down(),
_ => {}
}

View File

@ -114,7 +114,10 @@ impl DataState {
let current_instant = std::time::Instant::now();
// CPU
self.data.cpu = cpu::get_cpu_data_list(&self.sys);
// Processes
if let Ok(process_list) = processes::get_sorted_processes_list(
&self.sys,
&mut self.prev_idle,

View File

@ -311,10 +311,6 @@ fn handle_key_event_or_break(
KeyCode::Down => app.on_down_key(),
KeyCode::Left => app.on_left_key(),
KeyCode::Right => app.on_right_key(),
KeyCode::Char('H') => app.move_widget_selection_left(),
KeyCode::Char('L') => app.move_widget_selection_right(),
KeyCode::Char('K') => app.move_widget_selection_up(),
KeyCode::Char('J') => app.move_widget_selection_down(),
KeyCode::Char(character) => app.on_char_key(character),
KeyCode::Esc => app.on_esc(),
KeyCode::Enter => app.on_enter(),