Skip to content

Commit

Permalink
fix alt-enter failing to cd to directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Canop committed May 30, 2022
1 parent 97744ef commit 0ae8602
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### v1.13.1 - 2022-05-30
<a name="v1.13.1"></a>
- fix alt-enter failing to cd to directory

### v1.13.0 - 2022-05-29
<a name="v1.13.0"></a>
- close the staging area when it's emptied with a verb (e.g. on `:rm`)
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "broot"
version = "1.13.0"
version = "1.13.1"
authors = ["dystroy <denys.seguret@gmail.com>"]
repository = "https://github.com/Canop/broot"
documentation = "https://dystroy.org/broot"
Expand Down
1 change: 1 addition & 0 deletions src/verb/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ pub fn builtin_verbs() -> Vec<Verb> {
// those two operations are mapped on ALT-ENTER, one
// for directories and the other one for the other files
internal(open_leave) // calls the system open
.with_stype(SelectionType::File)
.with_key(key!(alt-enter))
.with_shortcut("ol"),
external("cd", "cd {directory}", FromParentShell)
Expand Down
13 changes: 0 additions & 13 deletions src/verb/verb_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use {
errors::ConfError,
keys::KEY_FORMAT,
},
crossterm::event::KeyEvent,
};

/// Provide access to the verbs:
Expand Down Expand Up @@ -107,18 +106,6 @@ impl VerbStore {
}
}

/// return the index of the verb which is triggered by the given keyboard key, if any
pub fn index_of_key(&self, key: KeyEvent) -> Option<usize> {
for i in 0..self.verbs.len() {
for verb_key in &self.verbs[i].keys {
if *verb_key == key {
return Some(i);
}
}
}
None
}

pub fn key_desc_of_internal_stype(
&self,
internal: Internal,
Expand Down

0 comments on commit 0ae8602

Please sign in to comment.