Skip to content
Closed
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 pkg/config/user_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ type KeybindingUniversalConfig struct {
GoInto string `yaml:"goInto"`
Confirm string `yaml:"confirm"`
ConfirmAlt1 string `yaml:"confirm-alt1"`
Cancel string `yaml:"cancel"`
Remove string `yaml:"remove"`
New string `yaml:"new"`
Edit string `yaml:"edit"`
Expand Down Expand Up @@ -451,6 +452,7 @@ func GetDefaultConfig() *UserConfig {
GoInto: "<enter>",
Confirm: "<enter>",
ConfirmAlt1: "y",
Cancel: "n",
Remove: "d",
New: "n",
Edit: "e",
Expand Down
6 changes: 6 additions & 0 deletions pkg/gui/confirmation_panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ func (gui *Gui) setKeyBindings(opts types.CreatePopupPanelOpts) error {
Key: keybindings.GetKey(keybindingConfig.Universal.Return),
Handler: gui.wrappedConfirmationFunction(opts.HandleClose),
},
{
ViewName: "confirmation",
Key: keybindings.GetKey(keybindingConfig.Universal.Cancel),
Handler: gui.wrappedConfirmationFunction(opts.HandleClose),
},
{
ViewName: "confirmation",
Key: keybindings.GetKey(keybindingConfig.Universal.TogglePanel),
Expand Down Expand Up @@ -283,6 +288,7 @@ func (gui *Gui) clearConfirmationViewKeyBindings() {
_ = gui.g.DeleteKeybinding("confirmation", keybindings.GetKey(keybindingConfig.Universal.Confirm), gocui.ModNone)
_ = gui.g.DeleteKeybinding("confirmation", keybindings.GetKey(keybindingConfig.Universal.ConfirmAlt1), gocui.ModNone)
_ = gui.g.DeleteKeybinding("confirmation", keybindings.GetKey(keybindingConfig.Universal.Return), gocui.ModNone)
_ = gui.g.DeleteKeybinding("confirmation", keybindings.GetKey(keybindingConfig.Universal.Cancel), gocui.ModNone)
_ = gui.g.DeleteKeybinding("suggestions", keybindings.GetKey(keybindingConfig.Universal.Confirm), gocui.ModNone)
_ = gui.g.DeleteKeybinding("suggestions", keybindings.GetKey(keybindingConfig.Universal.ConfirmAlt1), gocui.ModNone)
_ = gui.g.DeleteKeybinding("suggestions", keybindings.GetKey(keybindingConfig.Universal.Return), gocui.ModNone)
Expand Down