From b632dce0daffece3d1d7c7ca9d01f9feb79e2c4c Mon Sep 17 00:00:00 2001 From: FabianLars Date: Sat, 14 Mar 2020 10:51:36 +0100 Subject: fixed panic on pasting into non updating input --- native/src/widget/text_input.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'native/src/widget') diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs index 82406b5a..b41bfd6a 100644 --- a/native/src/widget/text_input.rs +++ b/native/src/widget/text_input.rs @@ -451,7 +451,7 @@ where } self.value.insert_many( - self.state.cursor.end(), + self.state.cursor.end().min(self.value.len()), content.clone(), ); -- cgit