From 3a456b09cb210196ae5ee4fe09c48cd173f754be Mon Sep 17 00:00:00 2001 From: K Simmons Date: Thu, 20 Oct 2022 16:30:07 -0700 Subject: [PATCH] catch keymap string only modifiers and no key --- crates/gpui/src/keymap.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/gpui/src/keymap.rs b/crates/gpui/src/keymap.rs index c408c98960..5d000081cf 100644 --- a/crates/gpui/src/keymap.rs +++ b/crates/gpui/src/keymap.rs @@ -301,6 +301,10 @@ impl Keystroke { } } + if key.is_none() { + return Err(anyhow!("Invalid keystroke `{}`", source)); + } + Ok(Keystroke { ctrl, alt,