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
This commit is contained in:
parent
ff25fa24e7
commit
9b07f36199
1 changed files with 1 additions and 1 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue