mirror of
https://github.com/gitui-org/gitui.git
synced 2026-10-12 02:14:16 +00:00
fix panic when cursor is OOB after closing editor with shorter msg
This commit is contained in:
@@ -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`.
|
||||
|
||||
Reference in New Issue
Block a user