From cfedbd1b36398a79737280706b482d6a9626546b Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Sat, 19 Dec 2020 17:00:42 +0100 Subject: [PATCH] fixes #448 * annotate a change in the keybindings more explicitly * log error reading key bindings into log --- assets/vim_style_key_config.ron | 3 +++ src/keys.rs | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/assets/vim_style_key_config.ron b/assets/vim_style_key_config.ron index 0a797757..bd193b3e 100644 --- a/assets/vim_style_key_config.ron +++ b/assets/vim_style_key_config.ron @@ -69,4 +69,7 @@ delete_branch: ( code: Char('D'), modifiers: ( bits: 1,),), push: ( code: Char('p'), modifiers: ( bits: 0,),), fetch: ( code: Char('f'), modifiers: ( bits: 0,),), + + //removed in 0.11 + //tab_toggle_reverse_windows: ( code: BackTab, modifiers: ( bits: 1,),), ) diff --git a/src/keys.rs b/src/keys.rs index 462d1b06..6bdc1f1c 100644 --- a/src/keys.rs +++ b/src/keys.rs @@ -157,7 +157,13 @@ impl KeyConfig { } pub fn init() -> Self { - Self::init_internal().unwrap_or_default() + match Self::init_internal() { + Ok(v) => v, + Err(e) => { + log::error!("failed loading key binding: {}", e); + Self::default() + } + } } }