Skip to content

Commit

Permalink
gpui: Fix Cut action in input example (#26203)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
greathongtu authored Mar 6, 2025
1 parent ff25fa2 commit 9b07f36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/gpui/examples/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 9b07f36

Please sign in to comment.