File tree Expand file tree Collapse file tree 1 file changed +21
-13
lines changed Expand file tree Collapse file tree 1 file changed +21
-13
lines changed Original file line number Diff line number Diff line change @@ -591,20 +591,28 @@ impl ConventionalCommitPopup {
591
591
}
592
592
#[ cfg( feature = "gitmoji" ) ]
593
593
{
594
- let ( emoji, short_msg, _) = self . query_results_more_info
595
- [ self . selected_index ]
596
- . strings ( ) ;
597
- self . queue . push ( crate :: queue:: InternalEvent :: OpenCommit ) ;
598
- self . queue . push (
599
- crate :: queue:: InternalEvent :: AddCommitMessage (
600
- format ! (
601
- "{emoji} {commit_type}{}{}{short_msg}" ,
602
- if self . is_breaking { "!" } else { "" } ,
603
- if short_msg. is_empty( ) { "" } else { ": " } ,
594
+ if let Some ( ( emoji, short_msg, _) ) = self
595
+ . query_results_more_info
596
+ . get ( self . selected_index )
597
+ . map ( |more_info| more_info. strings ( ) )
598
+ {
599
+ self . queue
600
+ . push ( crate :: queue:: InternalEvent :: OpenCommit ) ;
601
+ self . queue . push (
602
+ crate :: queue:: InternalEvent :: AddCommitMessage (
603
+ format ! (
604
+ "{emoji} {commit_type}{}{}{short_msg}" ,
605
+ if self . is_breaking { "!" } else { "" } ,
606
+ if short_msg. is_empty( ) {
607
+ ""
608
+ } else {
609
+ ": "
610
+ } ,
611
+ ) ,
604
612
) ,
605
- ) ,
606
- ) ;
607
- self . hide ( ) ;
613
+ ) ;
614
+ self . hide ( ) ;
615
+ }
608
616
}
609
617
}
610
618
You can’t perform that action at this time.
0 commit comments