summaryrefslogtreecommitdiffstats
path: root/native/src/widget/text_input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/widget/text_input.rs')
-rw-r--r--native/src/widget/text_input.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs
index 4e7906a8..cadef11d 100644
--- a/native/src/widget/text_input.rs
+++ b/native/src/widget/text_input.rs
@@ -214,12 +214,10 @@ where
match self.state.mouse.update(cursor_position) {
Interaction::DoubleClick(_) => {
+ let end = self.state.cursor.end();
self.state.cursor.select_range(
- self.value.previous_start_of_word(
- self.state.cursor.end(),
- ),
- self.value
- .next_end_of_word(self.state.cursor.end()),
+ self.value.previous_start_of_word(end),
+ self.value.next_end_of_word(end),
)
}
Interaction::TripleClick(_) => {