Skip to content

Commit

Permalink
Accept h and l in vi mode
Browse files Browse the repository at this point in the history
to clear selection and select all.
  • Loading branch information
afh committed Feb 27, 2024
1 parent 62dfcb9 commit eeb5dad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## [Unreleased] <!-- ReleaseDate -->

- No changes since the latest release below.
- Accept 'h' and 'l' keys in `MultiSelect` vim_mode to current clear selection and select all.

## [0.7.0] - 2024-02-24

Expand Down
2 changes: 2 additions & 0 deletions inquire/src/prompts/multiselect/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ impl InnerAction for MultiSelectPromptAction {
fn from_key(key: Key, config: &MultiSelectConfig) -> Option<Self> {
if config.vim_mode {
let action = match key {
Key::Char('h', KeyModifiers::NONE) => Some(Self::ClearSelections),
Key::Char('k', KeyModifiers::NONE) => Some(Self::MoveUp),
Key::Char('j', KeyModifiers::NONE) => Some(Self::MoveDown),
Key::Char('l', KeyModifiers::NONE) => Some(Self::SelectAll),
_ => None,
};

Expand Down

0 comments on commit eeb5dad

Please sign in to comment.