diff options
author | stk <stk@ableton.com> | 2023-01-22 15:09:13 +0100 |
---|---|---|
committer | stk <stk@ableton.com> | 2023-01-26 09:01:22 +0100 |
commit | 67fb28e2b89c7e9dd9cb58f6ad1acb76d4c78fa4 (patch) | |
tree | 8f6e0eeeb314aab4d393af863c242b55727d58e6 /pkg/gui/controllers/local_commits_controller.go | |
parent | b8d33b8f7bb68e859871fde7741f3e70f6c87c72 (diff) |
Add user config gui.skipRewordInEditorWarning
Diffstat (limited to 'pkg/gui/controllers/local_commits_controller.go')
-rw-r--r-- | pkg/gui/controllers/local_commits_controller.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/pkg/gui/controllers/local_commits_controller.go b/pkg/gui/controllers/local_commits_controller.go index 8480a84a8..3a9aff86b 100644 --- a/pkg/gui/controllers/local_commits_controller.go +++ b/pkg/gui/controllers/local_commits_controller.go @@ -255,11 +255,15 @@ func (self *LocalCommitsController) rewordEditor(commit *models.Commit) error { return nil } - return self.c.Confirm(types.ConfirmOpts{ - Title: self.c.Tr.RewordInEditorTitle, - Prompt: self.c.Tr.RewordInEditorPrompt, - HandleConfirm: self.doRewordEditor, - }) + if self.c.UserConfig.Gui.SkipRewordInEditorWarning { + return self.doRewordEditor() + } else { + return self.c.Confirm(types.ConfirmOpts{ + Title: self.c.Tr.RewordInEditorTitle, + Prompt: self.c.Tr.RewordInEditorPrompt, + HandleConfirm: self.doRewordEditor, + }) + } } func (self *LocalCommitsController) drop(commit *models.Commit) error { |