summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2022-05-30 08:53:21 +0200
committerCanop <cano.petrole@gmail.com>2022-05-30 08:53:21 +0200
commit0ae860274c57f7dbabc68d30dcf534bb062a68f9 (patch)
treeebec702a60d2a6a08dac77e2271d5468ee9f0024
parent97744ef02adffebb40498207155a642fddf25ce9 (diff)
fix alt-enter failing to cd to directoryv1.13.1
-rw-r--r--CHANGELOG.md4
-rw-r--r--Cargo.lock2
-rw-r--r--Cargo.toml2
-rw-r--r--src/verb/builtin.rs1
-rw-r--r--src/verb/verb_store.rs13
5 files changed, 7 insertions, 15 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 28fb0b1..afd9489 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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`)
diff --git a/Cargo.lock b/Cargo.lock
index e3226db..6700dd2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -140,7 +140,7 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "broot"
-version = "1.13.0"
+version = "1.13.1"
dependencies = [
"ahash 0.7.6",
"ansi_colours",
diff --git a/Cargo.toml b/Cargo.toml
index cb800c8..7c2a10b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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"
diff --git a/src/verb/builtin.rs b/src/verb/builtin.rs
index fbc9edf..d626a1a 100644
--- a/src/verb/builtin.rs
+++ b/src/verb/builtin.rs
@@ -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)
diff --git a/src/verb/verb_store.rs b/src/verb/verb_store.rs
index db95e49..f29b923 100644
--- a/src/verb/verb_store.rs
+++ b/src/verb/verb_store.rs
@@ -10,7 +10,6 @@ use {
errors::ConfError,
keys::KEY_FORMAT,
},
- crossterm::event::KeyEvent,
};
/// Provide access to the verbs:
@@ -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,