mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 00:48:35 +00:00
fix panic when cursor is OOB after closing editor with shorter msg
This commit is contained in:
parent
756c124b68
commit
bfda870933
1 changed files with 1 additions and 1 deletions
|
|
@ -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`.
|
||||
|
|
|
|||
Loading…
Reference in a new issue