summaryrefslogtreecommitdiffstats
path: root/pkg/gui/controllers/undo_controller.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-02-05 10:31:07 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-17 19:13:40 +1100
commit226985bf7602763f7578ef236bdc4cec3a1494e9 (patch)
tree3a12b9d41099902e411fe32df3b79d31e8a8f375 /pkg/gui/controllers/undo_controller.go
parent2db463681564e8db945cd6811fc633545ee9fd83 (diff)
refactor keybindings
Diffstat (limited to 'pkg/gui/controllers/undo_controller.go')
-rw-r--r--pkg/gui/controllers/undo_controller.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/pkg/gui/controllers/undo_controller.go b/pkg/gui/controllers/undo_controller.go
index 89bc6ea9e..0f288957c 100644
--- a/pkg/gui/controllers/undo_controller.go
+++ b/pkg/gui/controllers/undo_controller.go
@@ -4,7 +4,6 @@ import (
"github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/commands/types/enums"
- "github.com/jesseduffield/lazygit/pkg/config"
"github.com/jesseduffield/lazygit/pkg/gui/types"
"github.com/jesseduffield/lazygit/pkg/utils"
)
@@ -64,19 +63,15 @@ type reflogAction struct {
to string
}
-func (self *UndoController) Keybindings(
- getKey func(key string) interface{},
- config config.KeybindingConfig,
- guards types.KeybindingGuards,
-) []*types.Binding {
+func (self *UndoController) GetKeybindings(opts types.KeybindingsOpts) []*types.Binding {
bindings := []*types.Binding{
{
- Key: getKey(config.Universal.Undo),
+ Key: opts.GetKey(opts.Config.Universal.Undo),
Handler: self.reflogUndo,
Description: self.c.Tr.LcUndoReflog,
},
{
- Key: getKey(config.Universal.Redo),
+ Key: opts.GetKey(opts.Config.Universal.Redo),
Handler: self.reflogRedo,
Description: self.c.Tr.LcRedoReflog,
},