From 1d502d3245c543f20b4b72d00f555bb41438e374 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 27 Jun 2024 10:23:08 +0200 Subject: [PATCH] Remove return value from ResizeCurrentPopupPanel It always returned nil, so there's no point in returning an error. --- pkg/gui/controllers/helpers/confirmation_helper.go | 4 +--- pkg/gui/layout.go | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg/gui/controllers/helpers/confirmation_helper.go b/pkg/gui/controllers/helpers/confirmation_helper.go index 9fa2ce8a8..2a1a821c2 100644 --- a/pkg/gui/controllers/helpers/confirmation_helper.go +++ b/pkg/gui/controllers/helpers/confirmation_helper.go @@ -315,7 +315,7 @@ func (self *ConfirmationHelper) getSelectedSuggestionValue() string { return "" } -func (self *ConfirmationHelper) ResizeCurrentPopupPanel() error { +func (self *ConfirmationHelper) ResizeCurrentPopupPanel() { c := self.c.CurrentContext() switch c { @@ -326,8 +326,6 @@ func (self *ConfirmationHelper) ResizeCurrentPopupPanel() error { case self.c.Contexts().CommitMessage, self.c.Contexts().CommitDescription: self.ResizeCommitMessagePanels() } - - return nil } func (self *ConfirmationHelper) resizeMenu() { diff --git a/pkg/gui/layout.go b/pkg/gui/layout.go index 861bb0bd1..077ee3c84 100644 --- a/pkg/gui/layout.go +++ b/pkg/gui/layout.go @@ -173,9 +173,7 @@ func (gui *Gui) layout(g *gocui.Gui) error { // if you run `lazygit --logs` // this will let you see these branches as prettified json // gui.c.Log.Info(utils.AsJson(gui.State.Model.Branches[0:4])) - if err := gui.helpers.Confirmation.ResizeCurrentPopupPanel(); err != nil { - return err - } + gui.helpers.Confirmation.ResizeCurrentPopupPanel() gui.renderContextOptionsMap()