From e3e94de473109335ae290d308841de988b3694de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Tue, 25 Nov 2025 10:40:12 +0100 Subject: [PATCH] Expose `select_range` in `runtime::widget::operation` --- runtime/src/widget/operation.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/runtime/src/widget/operation.rs b/runtime/src/widget/operation.rs index ab03bbe0..8a1af55a 100644 --- a/runtime/src/widget/operation.rs +++ b/runtime/src/widget/operation.rs @@ -86,3 +86,12 @@ pub fn move_cursor_to(id: impl Into, position: usize) -> Task { pub fn select_all(id: impl Into) -> Task { task::effect(Action::widget(operation::text_input::select_all(id.into()))) } + +/// Selects the given content range of the widget with the given [`Id`]. +pub fn select_range(id: impl Into, start: usize, end: usize) -> Task { + task::effect(Action::widget(operation::text_input::select_range( + id.into(), + start, + end, + ))) +}