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, } }