mirror of
https://github.com/zellij-org/zellij.git
synced 2024-12-25 02:06:19 +03:00
fix(config): warn on mode without actions (#1035)
Log with a warning, if the user finds himself in a mode, that has no action associated with it. fix #949
This commit is contained in:
parent
a0791e3504
commit
c82ee774ce
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user