mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 01:18:21 +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`.
|
/// Set the `msg`.
|
||||||
pub fn set_text(&mut self, msg: String) {
|
pub fn set_text(&mut self, msg: String) {
|
||||||
self.msg = msg;
|
self.msg = msg;
|
||||||
//TODO: make sure cursor is in bounds
|
self.cursor_position = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the `title`.
|
/// Set the `title`.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue