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
1 changed files with 8 additions and 1 deletions
|
|
@ -198,7 +198,14 @@ impl Keybinds {
|
||||||
keybinds
|
keybinds
|
||||||
.0
|
.0
|
||||||
.get(mode)
|
.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
|
.0
|
||||||
.get(key)
|
.get(key)
|
||||||
.cloned()
|
.cloned()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue