File tree Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -719,9 +719,6 @@ impl Component for ConventionalCommitPopup {
719719 }
720720 }
721721 }
722- } else if key_match ( key, self . key_config . keys . insert )
723- {
724- self . is_insert = true ;
725722 } else if key_match (
726723 key,
727724 self . key_config . keys . popup_down ,
@@ -733,8 +730,27 @@ impl Component for ConventionalCommitPopup {
733730 ) {
734731 self . move_selection ( ScrollType :: Up ) ;
735732 } else {
736- if self . input . event ( event) ?. is_consumed ( ) {
737- self . update_query ( ) ;
733+ if self . is_insert {
734+ if self . input . event ( event) ?. is_consumed ( ) {
735+ self . update_query ( ) ;
736+ }
737+ } else if key_match (
738+ key,
739+ self . key_config . keys . insert ,
740+ ) {
741+ self . is_insert = true ;
742+ } else {
743+ if let KeyCode :: Char ( c) = key. code {
744+ if let Some ( idx) = self
745+ . quick_shortcuts ( )
746+ . into_iter ( )
747+ . position ( |ch| ch == c)
748+ {
749+ self . seleted_commit_type = Some (
750+ self . query_results [ idx] . clone ( ) ,
751+ ) ;
752+ }
753+ }
738754 }
739755 }
740756 }
You can’t perform that action at this time.
0 commit comments