1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

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.
This commit is contained in:
Jesse Duffield
2023-05-21 11:02:36 +10:00
parent 460a166e16
commit e1fc90615d
2 changed files with 28 additions and 4 deletions

View File

@ -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{
{