diff options
| author | Jae-Heon Ji <32578710+jaeheonji@users.noreply.github.com> | 2023-02-16 22:32:27 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-16 22:32:27 +0900 |
| commit | 00cd33637bd43e1c0980254a04ce18f0dedb2b57 (patch) | |
| tree | cff9f7d0ea630ca198f24de51f5712d9cbad046d /default-plugins | |
| parent | docs(changelog): apply correct color on tabs (diff) | |
| download | sl0ppij-00cd33637bd43e1c0980254a04ce18f0dedb2b57.tar.gz sl0ppij-00cd33637bd43e1c0980254a04ce18f0dedb2b57.tar.xz sl0ppij-00cd33637bd43e1c0980254a04ce18f0dedb2b57.zip | |
feat: add args to new-tab action (#2072)
* fix(themes): missing tokyo-night-dark theme
* feat: add args to new-tab action
* fix: name can be set without layout
* feat: pass config options to action parser
* chore: remove unnecessary default values
* chore: update snapshots
* fix(status-bar): add exception for NewTab
* fix: update code review
* feat: add shallow_eq for action
Diffstat (limited to 'default-plugins')
| -rw-r--r-- | default-plugins/status-bar/src/main.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/default-plugins/status-bar/src/main.rs b/default-plugins/status-bar/src/main.rs index 9a110310..603cdf35 100644 --- a/default-plugins/status-bar/src/main.rs +++ b/default-plugins/status-bar/src/main.rs @@ -351,7 +351,13 @@ pub fn action_key(keymap: &[(Key, Vec<Action>)], action: &[Action]) -> Vec<Key> keymap .iter() .filter_map(|(key, acvec)| { - if acvec.as_slice() == action { + let matching = acvec + .iter() + .zip(action) + .filter(|(a, b)| a.shallow_eq(b)) + .count(); + + if matching == acvec.len() && matching == action.len() { Some(*key) } else { None |
