From d7ef4824e1b0a5849b2b5588cec658d100abc2b4 Mon Sep 17 00:00:00 2001 From: mattwparas Date: Tue, 20 Feb 2024 08:46:51 -0800 Subject: [PATCH] remove global keybindings thread local --- helix-term/src/commands/engine/steel.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/helix-term/src/commands/engine/steel.rs b/helix-term/src/commands/engine/steel.rs index ed5caf8c4..0a294d986 100644 --- a/helix-term/src/commands/engine/steel.rs +++ b/helix-term/src/commands/engine/steel.rs @@ -112,7 +112,6 @@ thread_local! { pub static REVERSE_BUFFER_MAP: SteelVal = SteelVal::boxed(SteelVal::empty_hashmap()); - pub static GLOBAL_KEYBINDING_MAP: SteelVal = get_keymap().into_steelval().unwrap(); } fn load_keymap_api(engine: &mut Engine, api: KeyMapApi) { @@ -137,11 +136,6 @@ fn load_keymap_api(engine: &mut Engine, api: KeyMapApi) { REVERSE_BUFFER_MAP.with(|x| x.clone()), ); - module.register_value( - "*global-keybinding-map*", - GLOBAL_KEYBINDING_MAP.with(|x| x.clone()), - ); - engine.register_module(module); } @@ -533,7 +527,7 @@ fn load_configuration_api(engine: &mut Engine, generate_sources: bool) { r#" (provide update-configuration!) (define (update-configuration!) - (helix.update-configuration! *helix.cx*)) + (helix.update-configuration! *helix.config*)) "#, )); @@ -542,7 +536,7 @@ fn load_configuration_api(engine: &mut Engine, generate_sources: bool) { r#" (provide get-keybindings) (define (get-keybindings) - (helix.get-keybindings *helix.cx*)) + (helix.get-keybindings *helix.config*)) "#, )); @@ -1007,8 +1001,7 @@ impl SteelScriptingEngine { } } - // Refer to the global keybinding map for the rest - Some(GLOBAL_KEYBINDING_MAP.with(|x| x.clone())) + None } }