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

fix click handling

This commit is contained in:
Jesse Duffield
2022-02-27 11:42:22 +11:00
parent cf00949b85
commit 59d4df2a44
52 changed files with 499 additions and 259 deletions

View File

@ -35,10 +35,6 @@ func (self *RemotesController) GetKeybindings(opts types.KeybindingsOpts) []*typ
Key: opts.GetKey(opts.Config.Universal.GoInto),
Handler: self.checkSelected(self.enter),
},
// {
// Key: gocui.MouseLeft,
// Handler: func() error { return self.context.HandleClick(self.checkSelected(self.enter)) },
// },
{
Key: opts.GetKey(opts.Config.Branches.FetchRemote),
Handler: self.checkSelected(self.fetch),
@ -64,6 +60,10 @@ func (self *RemotesController) GetKeybindings(opts types.KeybindingsOpts) []*typ
return bindings
}
func (self *RemotesController) GetOnClick() func() error {
return self.checkSelected(self.enter)
}
func (self *RemotesController) enter(remote *models.Remote) error {
// naive implementation: get the branches from the remote and render them to the list, change the context
self.setRemoteBranches(remote.Branches)