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

move diffing menu action to controller

This commit is contained in:
Jesse Duffield
2023-03-23 22:32:41 +11:00
parent 7848958326
commit 2da300f2fb
5 changed files with 98 additions and 97 deletions

View File

@ -75,6 +75,18 @@ func (self *GlobalController) GetKeybindings(opts types.KeybindingsOpts) []*type
Description: self.c.Tr.LcOpenFilteringMenu,
OpensMenu: true,
},
{
Key: opts.GetKey(opts.Config.Universal.DiffingMenu),
Handler: self.createDiffingMenu,
Description: self.c.Tr.LcOpenDiffingMenu,
OpensMenu: true,
},
{
Key: opts.GetKey(opts.Config.Universal.DiffingMenuAlt),
Handler: self.createDiffingMenu,
Description: self.c.Tr.LcOpenDiffingMenu,
OpensMenu: true,
},
}
}
@ -109,3 +121,7 @@ func (self *GlobalController) createOptionsMenu() error {
func (self *GlobalController) createFilteringMenu() error {
return (&FilteringMenuAction{c: self.c}).Call()
}
func (self *GlobalController) createDiffingMenu() error {
return (&DiffingMenuAction{c: self.c}).Call()
}