Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/Config.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ keybinding:
goInto: '<enter>'
openRecentRepos: '<c-r>'
confirm: '<enter>'
# confirm-prompt: 'y' # confirm prompt messages (alternative to the 'confirm')
# cancel-prompt: 'n' # close/abort prompt messages (alternative to the 'return')
remove: 'd'
new: 'n'
edit: 'e'
Expand Down
2 changes: 2 additions & 0 deletions pkg/config/user_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ type KeybindingUniversalConfig struct {
GoInto string `yaml:"goInto"`
Confirm string `yaml:"confirm"`
ConfirmInEditor string `yaml:"confirmInEditor"`
ConfirmPrompt string `yaml:"confirm-prompt"`
CancelPrompt string `yaml:"cancel-prompt"`
Remove string `yaml:"remove"`
New string `yaml:"new"`
Edit string `yaml:"edit"`
Expand Down
8 changes: 8 additions & 0 deletions pkg/gui/controllers/confirmation_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ func (self *ConfirmationController) GetKeybindings(opts types.KeybindingsOpts) [
Description: self.c.Tr.CloseCancel,
Display: true,
},
{
Key: opts.GetKey(opts.Config.Universal.ConfirmPrompt),
Handler: func() error { return self.context().State.OnConfirm() },
},
{
Key: opts.GetKey(opts.Config.Universal.CancelPrompt),
Handler: func() error { return self.context().State.OnClose() },
},
{
Key: opts.GetKey(opts.Config.Universal.TogglePanel),
Handler: func() error {
Expand Down