From 099cb8d4f79e614a642706a602b5ef1c5e1eedef Mon Sep 17 00:00:00 2001 From: Joscha Date: Sat, 23 Jul 2022 23:45:42 +0200 Subject: [PATCH] Fix cursor placement in nick dialog --- src/ui/widgets/editor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/widgets/editor.rs b/src/ui/widgets/editor.rs index 9a20de1..3835b1b 100644 --- a/src/ui/widgets/editor.rs +++ b/src/ui/widgets/editor.rs @@ -30,9 +30,9 @@ struct InnerEditorState { impl InnerEditorState { fn new(text: String) -> Self { Self { - text, - idx: 0, + idx: text.len(), last_width: 0, + text, } }