aboutsummaryrefslogtreecommitdiff
path: root/src/config/keybinds.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config/keybinds.rs')
-rw-r--r--src/config/keybinds.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/config/keybinds.rs b/src/config/keybinds.rs
index 014bab7a..e6109e30 100644
--- a/src/config/keybinds.rs
+++ b/src/config/keybinds.rs
@@ -252,6 +252,7 @@ pub struct Keybinds {
pub rename_workspace: ActionKeybinds,
pub close_workspace: ActionKeybinds,
pub workspace_picker: ActionKeybinds,
+ pub goto: ActionKeybinds,
pub detach: ActionKeybinds,
pub reload_config: ActionKeybinds,
pub open_notification_target: ActionKeybinds,
@@ -384,6 +385,7 @@ impl Config {
rename_workspace: action!("keys.rename_workspace", &self.keys.rename_workspace),
close_workspace: action!("keys.close_workspace", &self.keys.close_workspace),
workspace_picker: action!("keys.workspace_picker", &self.keys.workspace_picker),
+ goto: action!("keys.goto", &self.keys.goto),
detach: action!("keys.detach", &self.keys.detach),
reload_config: action!("keys.reload_config", &self.keys.reload_config),
open_notification_target: action!(
@@ -1099,6 +1101,18 @@ next_tab = "prefix+n"
}
#[test]
+ fn goto_defaults_to_prefix_g() {
+ let kb = Config::default().keybinds();
+ assert_eq!(
+ binding_triggers(&kb.goto),
+ vec![BindingTrigger::Prefix((
+ KeyCode::Char('g'),
+ KeyModifiers::empty()
+ ))]
+ );
+ }
+
+ #[test]
fn open_and_remove_worktree_keybinds_are_unset_by_default() {
let kb = Config::default().keybinds();
assert!(kb.open_worktree.bindings.is_empty());