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 {
7979 }
8080 }
8181
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+
8290 ///
8391 pub const fn with_input_type (
8492 mut self ,
Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ impl CommitPopup {
9292
9393 pub fn set_msg ( & mut self , msg : String ) {
9494 self . input . set_text ( msg) ;
95+ self . input . move_cursor_to_end ( ) ;
9596 }
9697
9798 ///
Original file line number Diff line number Diff line change @@ -417,9 +417,6 @@ impl ConventionalCommitPopup {
417417 let list_height =
418418 height. saturating_sub ( HEIGHT_BLOCK_MARGIN ) ;
419419
420- let a = self . query_results [ 0 ] . more_info ( ) [ 0 ] . strings ( ) ;
421- assert ! ( a. 0 != "" ) ;
422-
423420 let scroll_skip =
424421 self . selected_index . saturating_sub ( list_height) ;
425422 let quick_shortcuts = self . quick_shortcuts ( ) ;
@@ -679,6 +676,8 @@ impl Component for ConventionalCommitPopup {
679676 ) ,
680677 ) ;
681678 self . hide ( ) ;
679+ self . selected_index = 0 ;
680+ self . seleted_commit_type = None ;
682681 } else {
683682 self . seleted_commit_type = self
684683 . query_results
You can’t perform that action at this time.
0 commit comments