diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-05-21 11:02:36 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-05-21 11:31:29 +1000 |
commit | e1fc90615d75913c21eb0050e53d4452f9a3b0d0 (patch) | |
tree | 426b6c52b1aef43dc26ef46185103d0b3722f7cc /pkg/gui/controllers/menu_controller.go | |
parent | 460a166e166ba7bfa67aa7b1758b410930194e3f (diff) |
Apply strikethrough style to reserved keybindings in menus
If a given menu item has an associated keybinding of 'enter', hitting enter won't actually execute
that item unless your cursor is on it. This creates confusion, and so we're going to use a strikethrough
style to communicate that the keybinding is reserved for something else.
Diffstat (limited to 'pkg/gui/controllers/menu_controller.go')
-rw-r--r-- | pkg/gui/controllers/menu_controller.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/gui/controllers/menu_controller.go b/pkg/gui/controllers/menu_controller.go index b687778ac..58b0fcdd5 100644 --- a/pkg/gui/controllers/menu_controller.go +++ b/pkg/gui/controllers/menu_controller.go @@ -21,6 +21,8 @@ func NewMenuController( } } +// NOTE: if you add a new keybinding here, you'll also need to add it to +// `reservedKeys` in `pkg/gui/context/menu_context.go` func (self *MenuController) GetKeybindings(opts types.KeybindingsOpts) []*types.Binding { bindings := []*types.Binding{ { |