Skip to content

Commit b0114bc

Browse files
committed
compiles
1 parent 36aed54 commit b0114bc

File tree

9 files changed

+406
-7
lines changed

9 files changed

+406
-7
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ serde = "1.0"
5151
shellexpand = "3.1"
5252
simplelog = { version = "0.12", default-features = false }
5353
struct-patch = "0.8"
54+
strum = "0.26.3"
5455
syntect = { version = "5.2", default-features = false, features = [
5556
"parsing",
5657
"default-syntaxes",

src/app.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ use crate::{
1111
popup_stack::PopupStack,
1212
popups::{
1313
AppOption, BlameFilePopup, BranchListPopup, CommitPopup,
14-
CompareCommitsPopup, ConfirmPopup, CreateBranchPopup,
15-
CreateRemotePopup, ExternalEditorPopup, FetchPopup,
16-
FileRevlogPopup, FuzzyFindPopup, HelpPopup,
14+
CompareCommitsPopup, ConfirmPopup, ConventionalCommitPopup,
15+
CreateBranchPopup, CreateRemotePopup, ExternalEditorPopup,
16+
FetchPopup, FileRevlogPopup, FuzzyFindPopup, HelpPopup,
1717
InspectCommitPopup, LogSearchPopupPopup, MsgPopup,
1818
OptionsPopup, PullPopup, PushPopup, PushTagsPopup,
1919
RemoteListPopup, RenameBranchPopup, RenameRemotePopup,
@@ -93,6 +93,7 @@ pub struct App {
9393
update_remote_url_popup: UpdateRemoteUrlPopup,
9494
remotes_popup: RemoteListPopup,
9595
rename_branch_popup: RenameBranchPopup,
96+
conventional_commit_popup: ConventionalCommitPopup,
9697
select_branch_popup: BranchListPopup,
9798
options_popup: OptionsPopup,
9899
submodule_popup: SubmodulesListPopup,
@@ -200,6 +201,9 @@ impl App {
200201
update_remote_url_popup: UpdateRemoteUrlPopup::new(&env),
201202
remotes_popup: RemoteListPopup::new(&env),
202203
rename_branch_popup: RenameBranchPopup::new(&env),
204+
conventional_commit_popup: ConventionalCommitPopup::new(
205+
&env,
206+
),
203207
select_branch_popup: BranchListPopup::new(&env),
204208
tags_popup: TagListPopup::new(&env),
205209
options_popup: OptionsPopup::new(&env),
@@ -458,6 +462,7 @@ impl App {
458462
|| self.fetch_popup.any_work_pending()
459463
|| self.revision_files_popup.any_work_pending()
460464
|| self.tags_popup.any_work_pending()
465+
|| self.conventional_commit_popup.any_work_pending()
461466
}
462467

463468
///
@@ -481,6 +486,7 @@ impl App {
481486
msg_popup,
482487
confirm_popup,
483488
commit_popup,
489+
conventional_commit_popup,
484490
blame_file_popup,
485491
file_revlog_popup,
486492
stashmsg_popup,
@@ -520,6 +526,7 @@ impl App {
520526
stashmsg_popup,
521527
help_popup,
522528
inspect_commit_popup,
529+
conventional_commit_popup,
523530
compare_commits_popup,
524531
blame_file_popup,
525532
file_revlog_popup,
@@ -738,6 +745,9 @@ impl App {
738745
}
739746
InternalEvent::Update(u) => flags.insert(u),
740747
InternalEvent::OpenCommit => self.commit_popup.show()?,
748+
InternalEvent::OpenConventionalCommit => {
749+
self.conventional_commit_popup.show()?
750+
}
741751
InternalEvent::RewordCommit(id) => {
742752
self.commit_popup.open(Some(id))?;
743753
}

src/keys/key_list.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ pub struct KeysList {
4949
pub quit: GituiKeyEvent,
5050
pub exit_popup: GituiKeyEvent,
5151
pub open_commit: GituiKeyEvent,
52+
pub open_conventional_commit: GituiKeyEvent,
5253
pub open_commit_editor: GituiKeyEvent,
5354
pub open_help: GituiKeyEvent,
5455
pub open_options: GituiKeyEvent,
@@ -128,6 +129,7 @@ pub struct KeysList {
128129
pub commit_history_next: GituiKeyEvent,
129130
pub commit: GituiKeyEvent,
130131
pub newline: GituiKeyEvent,
132+
pub insert: GituiKeyEvent,
131133
}
132134

133135
#[rustfmt::skip]
@@ -146,6 +148,7 @@ impl Default for KeysList {
146148
quit: GituiKeyEvent::new(KeyCode::Char('q'), KeyModifiers::empty()),
147149
exit_popup: GituiKeyEvent::new(KeyCode::Esc, KeyModifiers::empty()),
148150
open_commit: GituiKeyEvent::new(KeyCode::Char('c'), KeyModifiers::empty()),
151+
open_conventional_commit: GituiKeyEvent::new(KeyCode::Char('C'), KeyModifiers::empty()),
149152
open_commit_editor: GituiKeyEvent::new(KeyCode::Char('e'), KeyModifiers::CONTROL),
150153
open_help: GituiKeyEvent::new(KeyCode::Char('h'), KeyModifiers::empty()),
151154
open_options: GituiKeyEvent::new(KeyCode::Char('o'), KeyModifiers::empty()),
@@ -175,6 +178,7 @@ impl Default for KeysList {
175178
stashing_save: GituiKeyEvent::new(KeyCode::Char('s'), KeyModifiers::empty()),
176179
stashing_toggle_untracked: GituiKeyEvent::new(KeyCode::Char('u'), KeyModifiers::empty()),
177180
stashing_toggle_index: GituiKeyEvent::new(KeyCode::Char('i'), KeyModifiers::empty()),
181+
insert: GituiKeyEvent::new(KeyCode::Char('i'), KeyModifiers::empty()),
178182
stash_apply: GituiKeyEvent::new(KeyCode::Char('a'), KeyModifiers::empty()),
179183
stash_open: GituiKeyEvent::new(KeyCode::Right, KeyModifiers::empty()),
180184
stash_drop: GituiKeyEvent::new(KeyCode::Char('D'), KeyModifiers::SHIFT),

0 commit comments

Comments
 (0)