Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File find popup up/down keys resolves #977 #993

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- support `home` and `end` keys in branchlist ([#957](https://github.com/extrawurst/gitui/issues/957))
- add `ghemoji` feature to make gh-emoji (GitHub emoji) optional ([#954](https://github.com/extrawurst/gitui/pull/954))
- allow customizing key symbols like `⏎` & `⇧` ([see docs](https://github.com/extrawurst/gitui/blob/master/KEY_CONFIG.md#key-symbols)) ([#465](https://github.com/extrawurst/gitui/issues/465))
- fuzzy finder up/down keys compatible with typing search patterns ([#993](https://github.com/extrawurst/gitui/pull/993))

### Fixed
- honor options (for untracked files) in `stage_all` command ([#933](https://github.com/extrawurst/gitui/issues/933))
Expand Down
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,),),
extrawurst marked this conversation as resolved.
Show resolved Hide resolved
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