diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-27 17:15:17 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-27 18:16:16 +1100 |
commit | 9c226eed37f6a1f8ad12f5e7935efe9383eab450 (patch) | |
tree | 4c4a232cdb677bee0a354707d5665c3799c38a66 /pkg/gui/controllers/menu_controller.go | |
parent | e43ce236425fa354500e2e1600cf9b21ef841f05 (diff) |
allow menu to store keybindings for quick menu navigation
Diffstat (limited to 'pkg/gui/controllers/menu_controller.go')
-rw-r--r-- | pkg/gui/controllers/menu_controller.go | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/pkg/gui/controllers/menu_controller.go b/pkg/gui/controllers/menu_controller.go index 910e50668..9501a0bf2 100644 --- a/pkg/gui/controllers/menu_controller.go +++ b/pkg/gui/controllers/menu_controller.go @@ -49,17 +49,7 @@ func (self *MenuController) GetOnClick() func() error { } func (self *MenuController) press() error { - selectedItem := self.context().GetSelected() - - if err := self.c.PopContext(); err != nil { - return err - } - - if err := selectedItem.OnPress(); err != nil { - return err - } - - return nil + return self.context().OnMenuPress(self.context().GetSelected()) } func (self *MenuController) close() error { |