@@ -16,6 +16,7 @@ use unicode_segmentation::UnicodeSegmentation;
16
16
use crate :: components:: visibility_blocking;
17
17
use crate :: queue:: Queue ;
18
18
use crate :: string_utils:: trim_length_left;
19
+ use crate :: strings;
19
20
use crate :: ui:: style:: SharedTheme ;
20
21
use crate :: {
21
22
app:: Environment ,
@@ -466,7 +467,7 @@ impl ConventionalCommitPopup {
466
467
Line :: from (
467
468
text. graphemes ( true )
468
469
. enumerate ( )
469
- . map ( |( c_idx , c) | {
470
+ . map ( |( _ , c) | {
470
471
Span :: styled (
471
472
Cow :: from ( c. to_string ( ) ) ,
472
473
self . theme . text ( selected, selected) ,
@@ -665,32 +666,40 @@ impl Component for ConventionalCommitPopup {
665
666
out : & mut Vec < CommandInfo > ,
666
667
force_all : bool ,
667
668
) -> CommandBlocking {
668
- // if self.is_visible() || force_all {
669
- // self.input.commands(out, force_all);
670
- //
671
- // out.push(CommandInfo::new(
672
- // strings::commands::create_branch_confirm_msg(
673
- // &self.key_config,
674
- // ),
675
- // true,
676
- // true,
677
- // ));
678
- // }
679
- //
680
669
if self . is_visible ( ) || force_all {
681
- // out.push(CommandInfo::new(
682
- // strings::commands::scroll_popup(&self.key_config),
683
- // true,
684
- // true,
685
- // ));
686
- //
687
- // out.push(CommandInfo::new(
688
- // strings::commands::close_fuzzy_finder(
689
- // &self.key_config,
690
- // ),
691
- // true,
692
- // true,
693
- // ));
670
+ if self . is_insert {
671
+ out. push ( CommandInfo :: new (
672
+ strings:: commands:: exit_insert ( & self . key_config ) ,
673
+ true ,
674
+ true ,
675
+ ) ) ;
676
+ } else {
677
+ out. push ( CommandInfo :: new (
678
+ strings:: commands:: insert ( & self . key_config ) ,
679
+ true ,
680
+ true ,
681
+ ) ) ;
682
+
683
+ out. push ( CommandInfo :: new (
684
+ strings:: commands:: close_fuzzy_finder (
685
+ & self . key_config ,
686
+ ) ,
687
+ true ,
688
+ true ,
689
+ ) ) ;
690
+ }
691
+
692
+ out. push ( CommandInfo :: new (
693
+ strings:: commands:: scroll ( & self . key_config ) ,
694
+ true ,
695
+ true ,
696
+ ) ) ;
697
+
698
+ out. push ( CommandInfo :: new (
699
+ strings:: commands:: open_submodule ( & self . key_config ) ,
700
+ true ,
701
+ true ,
702
+ ) ) ;
694
703
}
695
704
696
705
visibility_blocking ( self )
0 commit comments