Skip to content

Commit

Permalink
Fix: respect global unbind_default_keys when a local config is pres…
Browse files Browse the repository at this point in the history
…ent, too

Previously, presence of a local `.helix/config.toml` would annulate a global `unbind_default_keys = true` setting.
With this change, this is no longer the case. The option will only be annulated if the local config declares `unbind_default_keys = false`.
  • Loading branch information
postsolar committed Apr 4, 2024
1 parent c096a1f commit 7fec720
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion helix-term/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ impl Config {
let mut keys;
match local.unbind_default_keys {
true => keys = HashMap::default(),
false => keys = keymap::default(),
false => match global.unbind_default_keys {
true => keys = HashMap::default(),
false => keys = keymap::default(),
},
}
if let Some(global_keys) = global.keys {
merge_keys(&mut keys, global_keys)
Expand Down

0 comments on commit 7fec720

Please sign in to comment.