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

move custom patch options menu action to controllers package

This commit is contained in:
Jesse Duffield
2023-03-23 21:39:30 +11:00
parent 820b1e811d
commit 71753770ad
4 changed files with 229 additions and 222 deletions

View File

@ -25,6 +25,12 @@ func (self *GlobalController) GetKeybindings(opts types.KeybindingsOpts) []*type
Handler: self.customCommand,
Description: self.c.Tr.LcExecuteCustomCommand,
},
{
Key: opts.GetKey(opts.Config.Universal.CreatePatchOptionsMenu),
Handler: self.createCustomPatchOptionsMenu,
Description: self.c.Tr.ViewPatchOptions,
OpensMenu: true,
},
}
}
@ -32,6 +38,10 @@ func (self *GlobalController) customCommand() error {
return (&CustomCommandAction{c: self.c}).Call()
}
func (self *GlobalController) createCustomPatchOptionsMenu() error {
return (&CustomPatchOptionsMenuAction{c: self.c}).Call()
}
func (self *GlobalController) Context() types.Context {
return nil
}