From 9b07f36199ce1de0a742cae5b60fec57731abf99 Mon Sep 17 00:00:00 2001 From: greathongtu <69706194+greathongtu@users.noreply.github.com> Date: Thu, 6 Mar 2025 23:02:52 +0800 Subject: [PATCH] gpui: Fix `Cut` action in input example (#26203) Zed fan trying to learn GPUI here. Notice one problem in input example which cause cmd-x function not work. Let me know if any adjustments are needed! Release Notes: - N/A --- crates/gpui/examples/input.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/gpui/examples/input.rs b/crates/gpui/examples/input.rs index a3a9d1f321..af2ec85003 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) { + fn cut(&mut self, _: &Cut, window: &mut Window, cx: &mut Context) { if !self.selected_range.is_empty() { cx.write_to_clipboard(ClipboardItem::new_string( (&self.content[self.selected_range.clone()]).to_string(),