Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

keymap_ui: Don't try to parse empty action arguments as JSON (#36278)

Ben Kunklef642f7615f87
diff --git a/crates/settings_ui/src/keybindings.rs b/crates/settings_ui/src/keybindings.rs
index 1aaab211aa4..b4e871c6174 100644
--- a/crates/settings_ui/src/keybindings.rs
+++ b/crates/settings_ui/src/keybindings.rs
@@ -2181,6 +2181,7 @@ impl KeybindingEditorModal {
let value = action_arguments
.as_ref()
+ .filter(|args| !args.is_empty())
.map(|args| {
serde_json::from_str(args).context("Failed to parse action arguments as JSON")
})