From af043b844403f39a939fa2ad3f9c84a60009b7f5 Mon Sep 17 00:00:00 2001 From: Nico Burns Date: Wed, 24 Jul 2024 16:51:14 +1200 Subject: [PATCH] Update selection when arrow keys are pressed --- parley/src/editor/selection.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/parley/src/editor/selection.rs b/parley/src/editor/selection.rs index 4d3f60a8..684ec103 100644 --- a/parley/src/editor/selection.rs +++ b/parley/src/editor/selection.rs @@ -138,6 +138,7 @@ impl TextWithSelection { self.selection = Some(Selection::caret(offset, Affinity::Downstream)); }; + self.needs_selection_update = true; } } Handled::Yes @@ -156,6 +157,7 @@ impl TextWithSelection { } else if let Some(o) = t.next_grapheme_offset(selection.active) { self.selection = Some(Selection::caret(o, Affinity::Upstream)); }; + self.needs_selection_update = true; } } Handled::Yes