summaryrefslogtreecommitdiffstats
path: root/pkg/gui/menu_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2018-09-12 18:47:37 +1000
committerJesse Duffield <jessedduffield@gmail.com>2018-09-12 18:47:37 +1000
commit31c33dfdcb4f8e27a8b50493876b17825c25c0ec (patch)
treeba80586764ad1da997dc6f7cf80beccaef5645fd /pkg/gui/menu_panel.go
parentf8b484f638e813537b9b968cf65d378b900fbcee (diff)
remove redundant comments
Diffstat (limited to 'pkg/gui/menu_panel.go')
-rw-r--r--pkg/gui/menu_panel.go8
1 files changed, 0 insertions, 8 deletions
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"))