@@ -16,6 +16,7 @@ use unicode_segmentation::UnicodeSegmentation;
1616use crate :: components:: visibility_blocking;
1717use crate :: queue:: Queue ;
1818use crate :: string_utils:: trim_length_left;
19+ use crate :: strings;
1920use crate :: ui:: style:: SharedTheme ;
2021use crate :: {
2122 app:: Environment ,
@@ -466,7 +467,7 @@ impl ConventionalCommitPopup {
466467 Line :: from (
467468 text. graphemes ( true )
468469 . enumerate ( )
469- . map ( |( c_idx , c) | {
470+ . map ( |( _ , c) | {
470471 Span :: styled (
471472 Cow :: from ( c. to_string ( ) ) ,
472473 self . theme . text ( selected, selected) ,
@@ -665,32 +666,40 @@ impl Component for ConventionalCommitPopup {
665666 out : & mut Vec < CommandInfo > ,
666667 force_all : bool ,
667668 ) -> 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- //
680669 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+ ) ) ;
694703 }
695704
696705 visibility_blocking ( self )
0 commit comments