diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-17 20:30:10 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-17 20:30:10 +1000 |
commit | 1716de3b59e408a1912d15519ca04a3d332e3632 (patch) | |
tree | ef6c69bed6650e9aa8edfed360a9c872fc8749ed /pkg/gui/confirmation_panel.go | |
parent | 44d8b3e8f3a49da82c0c39950f3df1086e1a6551 (diff) |
remove space as keybinding for confirmation panel
Diffstat (limited to 'pkg/gui/confirmation_panel.go')
-rw-r--r-- | pkg/gui/confirmation_panel.go | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/pkg/gui/confirmation_panel.go b/pkg/gui/confirmation_panel.go index 98a2a5fc6..a7e41b246 100644 --- a/pkg/gui/confirmation_panel.go +++ b/pkg/gui/confirmation_panel.go @@ -105,12 +105,8 @@ func (gui *Gui) closeConfirmationPrompt(returnFocusOnClose bool) error { } } - for _, key := range gui.menuConfirmationKeys() { - if err := gui.g.DeleteKeybinding("confirmation", key, gocui.ModNone); err != nil { - return err - } - } - + gui.g.DeleteKeybinding("confirmation", gui.getKey("universal.confirm"), gocui.ModNone) + gui.g.DeleteKeybinding("confirmation", gui.getKey("universal.confirm-alt1"), gocui.ModNone) gui.g.DeleteKeybinding("confirmation", gui.getKey("universal.return"), gocui.ModNone) return gui.g.DeleteView("confirmation") @@ -230,10 +226,11 @@ func (gui *Gui) setKeyBindings(opts createPopupPanelOpts) error { onConfirm = gui.wrappedConfirmationFunction(opts.handleConfirm, opts.returnFocusOnClose) } - for _, key := range gui.menuConfirmationKeys() { - if err := gui.g.SetKeybinding("confirmation", nil, key, gocui.ModNone, onConfirm); err != nil { - return err - } + if err := gui.g.SetKeybinding("confirmation", nil, gui.getKey("universal.confirm"), gocui.ModNone, onConfirm); err != nil { + return err + } + if err := gui.g.SetKeybinding("confirmation", nil, gui.getKey("universal.confirm-alt1"), gocui.ModNone, onConfirm); err != nil { + return err } return gui.g.SetKeybinding("confirmation", nil, gui.getKey("universal.return"), gocui.ModNone, gui.wrappedConfirmationFunction(opts.handleClose, opts.returnFocusOnClose)) |