From 31c33dfdcb4f8e27a8b50493876b17825c25c0ec Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Wed, 12 Sep 2018 18:47:37 +1000 Subject: remove redundant comments --- pkg/gui/menu_panel.go | 8 -------- 1 file changed, 8 deletions(-) (limited to 'pkg/gui/menu_panel.go') diff --git a/pkg/gui/menu_panel.go b/pkg/gui/menu_panel.go index f52ceda07..983543c94 100644 --- a/pkg/gui/menu_panel.go +++ b/pkg/gui/menu_panel.go @@ -8,12 +8,6 @@ import ( "github.com/jesseduffield/lazygit/pkg/utils" ) -// I need to store the handler function in state and it will take an interface and do something with it -// I need to have another function describing how to display one of the structs -// perhaps this calls for an interface where the struct is Binding and the interface has the methods Display and Execute -// but this means that for the one struct I can only have one possible display/execute function, but I want to use whatever I want. -// Would I ever need to use different handlers for different things? Maybe I should assume not given that I can cross that bridge when I come to it - func (gui *Gui) handleMenuPress(g *gocui.Gui, v *gocui.View) error { lineNumber := gui.getItemPosition(v) if gui.State.Keys[lineNumber].Key == nil { @@ -111,10 +105,8 @@ func (gui *Gui) handleMenu(g *gocui.Gui, v *gocui.View) error { content := append(contentPanel, contentGlobal...) gui.State.Keys = append(bindingsPanel, bindingsGlobal...) - // append newline at the end so the last line would be selectable contentJoined := strings.Join(content, "\n") - // y1-1 so there will not be an extra space at the end of panel x0, y0, x1, y1 := gui.getConfirmationPanelDimensions(g, contentJoined) menuView, _ := g.SetView("menu", x0, y0, x1, y1, 0) menuView.Title = strings.Title(gui.Tr.SLocalize("menu")) -- cgit v1.2.3