Skip to content

Commit b31c2aa

Browse files
committed
🏗️ refactor: move "Conventional Commit"
1 parent 63f656b commit b31c2aa

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

src/tabs/status.rs

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -686,8 +686,7 @@ impl Status {
686686
strings::commands::select_staging(&self.key_config),
687687
!focus_on_diff,
688688
(self.visible
689-
&& !focus_on_diff
690-
&& self.focus == Focus::WorkDir)
689+
&& !focus_on_diff && self.focus == Focus::WorkDir)
691690
|| force_all,
692691
)
693692
.order(strings::order::NAV),
@@ -697,8 +696,7 @@ impl Status {
697696
strings::commands::select_unstaged(&self.key_config),
698697
!focus_on_diff,
699698
(self.visible
700-
&& !focus_on_diff
701-
&& self.focus == Focus::Stage)
699+
&& !focus_on_diff && self.focus == Focus::Stage)
702700
|| force_all,
703701
)
704702
.order(strings::order::NAV),
@@ -736,17 +734,6 @@ impl Component for Status {
736734
.order(-1),
737735
);
738736

739-
out.push(
740-
CommandInfo::new(
741-
strings::commands::conventional_commit_open(
742-
&self.key_config,
743-
),
744-
true,
745-
self.can_commit() || force_all,
746-
)
747-
.order(-1),
748-
);
749-
750737
out.push(CommandInfo::new(
751738
strings::commands::open_branch_select_popup(
752739
&self.key_config,
@@ -815,6 +802,14 @@ impl Component for Status {
815802
true,
816803
true,
817804
));
805+
806+
out.push(CommandInfo::new(
807+
strings::commands::conventional_commit_open(
808+
&self.key_config,
809+
),
810+
true,
811+
self.can_commit() || force_all,
812+
));
818813
}
819814

820815
self.commands_nav(out, force_all);

0 commit comments

Comments
 (0)