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.

Move binding function back into keybinding module

Piotr Osiewicze83a29722978
diff --git a/crates/ui2/src/components/keybinding.rs b/crates/ui2/src/components/keybinding.rs
index 784886751f0..69396274fab 100644
--- a/crates/ui2/src/components/keybinding.rs
+++ b/crates/ui2/src/components/keybinding.rs
@@ -1,4 +1,4 @@
-use gpui::Action;
+use gpui::{actions, Action};
use strum::EnumIter;
use crate::prelude::*;
@@ -74,6 +74,12 @@ pub enum ModifierKey {
Shift,
}
+actions!(NoAction);
+
+pub fn binding(key: &str) -> gpui::KeyBinding {
+ gpui::KeyBinding::new(key, NoAction {}, None)
+}
+
#[cfg(feature = "stories")]
pub use stories::*;