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.

example: Fix Input example mistake (#13574)

Jason Lee6cedfa0ce765
diff --git a/crates/gpui/examples/input.rs b/crates/gpui/examples/input.rs
index 2b305738556..ed5047e8ccd 100644
--- a/crates/gpui/examples/input.rs
+++ b/crates/gpui/examples/input.rs
@@ -33,7 +33,7 @@ impl TextInput {
if self.selected_range.is_empty() {
self.move_to(self.previous_boundary(self.cursor_offset()), cx);
} else {
- self.move_to(self.selected_range.end, cx)
+ self.move_to(self.selected_range.start, cx)
}
}
@@ -41,7 +41,7 @@ impl TextInput {
if self.selected_range.is_empty() {
self.move_to(self.next_boundary(self.selected_range.end), cx);
} else {
- self.move_to(self.selected_range.start, cx)
+ self.move_to(self.selected_range.end, cx)
}
}
@@ -53,7 +53,7 @@ impl TextInput {
self.select_to(self.next_boundary(self.cursor_offset()), cx);
}
- fn select_all(&mut self, _: &SelectRight, cx: &mut ViewContext<Self>) {
+ fn select_all(&mut self, _: &SelectAll, cx: &mut ViewContext<Self>) {
self.move_to(0, cx);
self.select_to(self.content.len(), cx)
}