File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,14 @@ impl TextInputComponent {
79
79
}
80
80
}
81
81
82
+ pub fn move_cursor_to_end ( & mut self ) {
83
+ if let Some ( ta) = & mut self . textarea {
84
+ for _ in 0 ..100 {
85
+ ta. move_cursor ( CursorMove :: Forward ) ;
86
+ }
87
+ }
88
+ }
89
+
82
90
///
83
91
pub const fn with_input_type (
84
92
mut self ,
Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ impl CommitPopup {
92
92
93
93
pub fn set_msg ( & mut self , msg : String ) {
94
94
self . input . set_text ( msg) ;
95
+ self . input . move_cursor_to_end ( ) ;
95
96
}
96
97
97
98
///
Original file line number Diff line number Diff line change @@ -417,9 +417,6 @@ impl ConventionalCommitPopup {
417
417
let list_height =
418
418
height. saturating_sub ( HEIGHT_BLOCK_MARGIN ) ;
419
419
420
- let a = self . query_results [ 0 ] . more_info ( ) [ 0 ] . strings ( ) ;
421
- assert ! ( a. 0 != "" ) ;
422
-
423
420
let scroll_skip =
424
421
self . selected_index . saturating_sub ( list_height) ;
425
422
let quick_shortcuts = self . quick_shortcuts ( ) ;
@@ -679,6 +676,8 @@ impl Component for ConventionalCommitPopup {
679
676
) ,
680
677
) ;
681
678
self . hide ( ) ;
679
+ self . selected_index = 0 ;
680
+ self . seleted_commit_type = None ;
682
681
} else {
683
682
self . seleted_commit_type = self
684
683
. query_results
You can’t perform that action at this time.
0 commit comments