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.

gpui: Fix `Cut` action in input example (#26203)

greathongtu9b07f36199ce
diff --git a/crates/gpui/examples/input.rs b/crates/gpui/examples/input.rs
index a3a9d1f3211..af2ec850035 100644
--- a/crates/gpui/examples/input.rs
+++ b/crates/gpui/examples/input.rs
@@ -140,7 +140,7 @@ impl TextInput {
));
}
}
- fn cut(&mut self, _: &Copy, window: &mut Window, cx: &mut Context<Self>) {
+ fn cut(&mut self, _: &Cut, window: &mut Window, cx: &mut Context<Self>) {
if !self.selected_range.is_empty() {
cx.write_to_clipboard(ClipboardItem::new_string(
(&self.content[self.selected_range.clone()]).to_string(),