fix panic when cursor is OOB after closing editor with shorter msg

This commit is contained in:
Stephan Dilly 2020-07-04 15:44:24 +02:00
parent 756c124b68
commit bfda870933

View file

@ -89,7 +89,7 @@ impl TextInputComponent {
/// Set the `msg`.
pub fn set_text(&mut self, msg: String) {
self.msg = msg;
//TODO: make sure cursor is in bounds
self.cursor_position = 0;
}
/// Set the `title`.