diff options
author | Canop <cano.petrole@gmail.com> | 2022-05-30 08:53:21 +0200 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2022-05-30 08:53:21 +0200 |
commit | 0ae860274c57f7dbabc68d30dcf534bb062a68f9 (patch) | |
tree | ebec702a60d2a6a08dac77e2271d5468ee9f0024 /src | |
parent | 97744ef02adffebb40498207155a642fddf25ce9 (diff) |
fix alt-enter failing to cd to directoryv1.13.1
Diffstat (limited to 'src')
-rw-r--r-- | src/verb/builtin.rs | 1 | ||||
-rw-r--r-- | src/verb/verb_store.rs | 13 |
2 files changed, 1 insertions, 13 deletions
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, |