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

better handling of click events in list views

This commit is contained in:
Jesse Duffield
2019-11-17 17:23:06 +11:00
parent 07cbae4019
commit 3b0cef2ec8
9 changed files with 102 additions and 168 deletions

View File

@ -89,15 +89,3 @@ func (gui *Gui) createMenu(title string, items interface{}, itemCount int, handl
})
return nil
}
func (gui *Gui) handleMenuClick(g *gocui.Gui, v *gocui.View) error {
itemCount := gui.State.MenuItemCount
handleSelect := gui.handleMenuSelect
selectedLine := &gui.State.Panels.Menu.SelectedLine
if err := gui.handleClick(v, itemCount, selectedLine, handleSelect); err != nil {
return err
}
return gui.State.Panels.Menu.OnPress(g, v)
}