summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--zellij-utils/src/input/keybinds.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/zellij-utils/src/input/keybinds.rs b/zellij-utils/src/input/keybinds.rs
index 47b7fc3e0..5e8ba033e 100644
--- a/zellij-utils/src/input/keybinds.rs
+++ b/zellij-utils/src/input/keybinds.rs
@@ -198,7 +198,14 @@ impl Keybinds {
keybinds
.0
.get(mode)
- .unwrap_or_else(|| unreachable!("Unrecognized mode: {:?}", mode))
+ .unwrap_or({
+ log::warn!(
+ "The following mode has no action associated with it: {:?}",
+ mode
+ );
+ // create a dummy mode to recover from
+ &ModeKeybinds::new()
+ })
.0
.get(key)
.cloned()