From 6cedfa0ce7656f73a53a579dcadc58006d1158a3 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Thu, 27 Jun 2024 16:28:44 +0800 Subject: [PATCH] example: Fix Input example mistake (#13574) ![CleanShot 2024-06-27 at 15 52 48](https://github.com/zed-industries/zed/assets/5518/71b25759-0cd5-40ed-b7c2-2f1045f81683) Release Notes: - N/A --- crates/gpui/examples/input.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/gpui/examples/input.rs b/crates/gpui/examples/input.rs index 2b30573855..ed5047e8cc 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) { + fn select_all(&mut self, _: &SelectAll, cx: &mut ViewContext) { self.move_to(0, cx); self.select_to(self.content.len(), cx) }