diff options
Diffstat (limited to 'pkg/gui/confirmation_panel.go')
-rw-r--r-- | pkg/gui/confirmation_panel.go | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/pkg/gui/confirmation_panel.go b/pkg/gui/confirmation_panel.go index efb5a34d8..755d13f96 100644 --- a/pkg/gui/confirmation_panel.go +++ b/pkg/gui/confirmation_panel.go @@ -122,9 +122,7 @@ func (gui *Gui) createPopupPanel(g *gocui.Gui, currentView *gocui.View, title, p }() } - if err := gui.renderString(g, "confirmation", prompt); err != nil { - return err - } + gui.renderString(g, "confirmation", prompt) return gui.setKeyBindings(g, handleConfirm, handleClose, returnFocusOnClose) }) return nil @@ -151,19 +149,13 @@ func (gui *Gui) setKeyBindings(g *gocui.Gui, handleConfirm, handleClose func(*go "keyBindConfirm": "enter", }, ) - if err := gui.renderString(g, "options", actions); err != nil { - return err - } + gui.renderString(g, "options", actions) if err := g.SetKeybinding("confirmation", nil, gocui.KeyEnter, gocui.ModNone, gui.wrappedConfirmationFunction(handleConfirm, returnFocusOnClose)); err != nil { return err } return g.SetKeybinding("confirmation", nil, gocui.KeyEsc, gocui.ModNone, gui.wrappedConfirmationFunction(handleClose, returnFocusOnClose)) } -func (gui *Gui) createMessagePanel(g *gocui.Gui, currentView *gocui.View, title, prompt string) error { - return gui.createPopupPanel(g, currentView, title, prompt, false, true, false, nil, nil) -} - // createSpecificErrorPanel allows you to create an error popup, specifying the // view to be focused when the user closes the popup, and a boolean specifying // whether we will log the error. If the message may include a user password, |