1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-28 16:02:01 +03:00

Display more keybindings on-screen

This commit is contained in:
Jesse Duffield
2024-01-26 10:03:04 +11:00
parent 0f9d9e13d1
commit 1a38d515d7
16 changed files with 151 additions and 80 deletions

View File

@ -37,9 +37,10 @@ func NewWorktreesController(
func (self *WorktreesController) GetKeybindings(opts types.KeybindingsOpts) []*types.Binding {
bindings := []*types.Binding{
{
Key: opts.GetKey(opts.Config.Universal.New),
Handler: self.add,
Description: self.c.Tr.NewWorktree,
Key: opts.GetKey(opts.Config.Universal.New),
Handler: self.add,
Description: self.c.Tr.NewWorktree,
DisplayOnScreen: true,
},
{
Key: opts.GetKey(opts.Config.Universal.Select),
@ -47,6 +48,7 @@ func (self *WorktreesController) GetKeybindings(opts types.KeybindingsOpts) []*t
GetDisabledReason: self.require(self.singleItemSelected()),
Description: self.c.Tr.Switch,
Tooltip: self.c.Tr.SwitchToWorktreeTooltip,
DisplayOnScreen: true,
},
{
Key: opts.GetKey(opts.Config.Universal.Confirm),
@ -65,6 +67,7 @@ func (self *WorktreesController) GetKeybindings(opts types.KeybindingsOpts) []*t
GetDisabledReason: self.require(self.singleItemSelected()),
Description: self.c.Tr.Remove,
Tooltip: self.c.Tr.RemoveWorktreeTooltip,
DisplayOnScreen: true,
},
}