1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

move quit actions to controller

This commit is contained in:
Jesse Duffield
2023-03-26 15:38:18 +11:00
parent 6388885699
commit 037cd99138
6 changed files with 118 additions and 96 deletions

View File

@ -79,30 +79,6 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
opts := self.c.KeybindingsOpts()
bindings := []*types.Binding{
{
ViewName: "",
Key: opts.GetKey(opts.Config.Universal.Quit),
Modifier: gocui.ModNone,
Handler: self.handleQuit,
},
{
ViewName: "",
Key: opts.GetKey(opts.Config.Universal.QuitWithoutChangingDirectory),
Modifier: gocui.ModNone,
Handler: self.handleQuitWithoutChangingDirectory,
},
{
ViewName: "",
Key: opts.GetKey(opts.Config.Universal.QuitAlt1),
Modifier: gocui.ModNone,
Handler: self.handleQuit,
},
{
ViewName: "",
Key: opts.GetKey(opts.Config.Universal.Return),
Modifier: gocui.ModNone,
Handler: self.handleTopLevelReturn,
},
{
ViewName: "",
Key: opts.GetKey(opts.Config.Universal.OpenRecentRepos),