From 587eeaf94a1336ab640197e124ec2648caf70686 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 25 Sep 2018 13:45:00 +0200 Subject: run_key_action_for_mode(): Fix bugs from recent state & autopilot change * Use `state.in_mode` as `in_mode` will always be `None` now * Use `type_string` for map actions inside a mode. Otherwise the action wouldn't be typed. --- src/cocoa_bridge.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cocoa_bridge.rs b/src/cocoa_bridge.rs index 8e3b0ad..396b8a6 100644 --- a/src/cocoa_bridge.rs +++ b/src/cocoa_bridge.rs @@ -268,6 +268,8 @@ mode { if let Some(map) = mode.get(trigger) { return match map.kind { MapKind::Map => { + type_string(&map.action, &[], 0.0, 0.0); + Some( KeyActionResult::new(ActionKind::Map) .with_action(&map.action) @@ -286,7 +288,7 @@ mode { } // TODO: make sure this doesn't run when in_mode - if in_mode.is_none() { + if state.in_mode.is_none() { if let Some(map) = map { return match map.kind { MapKind::Map => { -- cgit v1.2.3