Skip to content

Commit

Permalink
File find popup up/down keys resolves #977
Browse files Browse the repository at this point in the history
  • Loading branch information
Rational-Curiosity committed Nov 21, 2021
1 parent 1d409d3 commit f45c04f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/file_find_popup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,9 @@ impl Component for FileFindPopup {
|| *key == self.key_config.keys.enter
{
self.hide();
} else if *key == self.key_config.keys.move_down {
} else if *key == self.key_config.keys.popup_down {
self.move_selection(ScrollType::Down);
} else if *key == self.key_config.keys.move_up {
} else if *key == self.key_config.keys.popup_up {
self.move_selection(ScrollType::Up);
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/keys/key_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ pub struct KeysList {
pub end: KeyEvent,
pub move_up: KeyEvent,
pub move_down: KeyEvent,
pub popup_up: KeyEvent,
pub popup_down: KeyEvent,
pub page_down: KeyEvent,
pub page_up: KeyEvent,
pub shift_up: KeyEvent,
Expand Down Expand Up @@ -114,6 +116,8 @@ impl Default for KeysList {
end: KeyEvent { code: KeyCode::End, modifiers: KeyModifiers::empty()},
move_up: KeyEvent { code: KeyCode::Up, modifiers: KeyModifiers::empty()},
move_down: KeyEvent { code: KeyCode::Down, modifiers: KeyModifiers::empty()},
popup_up: KeyEvent { code: KeyCode::Up, modifiers: KeyModifiers::empty()},
popup_down: KeyEvent { code: KeyCode::Down, modifiers: KeyModifiers::empty()},
page_down: KeyEvent { code: KeyCode::PageDown, modifiers: KeyModifiers::empty()},
page_up: KeyEvent { code: KeyCode::PageUp, modifiers: KeyModifiers::empty()},
shift_up: KeyEvent { code: KeyCode::Up, modifiers: KeyModifiers::SHIFT},
Expand Down
2 changes: 2 additions & 0 deletions vim_style_key_config.ron
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
end: ( code: End, modifiers: ( bits: 0,),),
move_up: ( code: Char('k'), modifiers: ( bits: 0,),),
move_down: ( code: Char('j'), modifiers: ( bits: 0,),),
popup_up: ( code: Char('p'), modifiers: ( bits: 2,),),
popup_down: ( code: Char('n'), modifiers: ( bits: 2,),),
page_up: ( code: Char('b'), modifiers: ( bits: 2,),),
page_down: ( code: Char('f'), modifiers: ( bits: 2,),),
tree_collapse_recursive: ( code: Left, modifiers: ( bits: 1,),),
Expand Down

0 comments on commit f45c04f

Please sign in to comment.