1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-25 12:24:47 +02:00

dont check for error when sending view to bottom

This commit is contained in:
Jesse Duffield 2020-08-17 20:49:47 +10:00
parent 62a662054b
commit e87635295a
3 changed files with 4 additions and 16 deletions

View File

@ -48,10 +48,7 @@ func (gui *Gui) handleSubmitCredential(g *gocui.Gui, v *gocui.View) error {
} }
func (gui *Gui) handleCloseCredentialsView(g *gocui.Gui, v *gocui.View) error { func (gui *Gui) handleCloseCredentialsView(g *gocui.Gui, v *gocui.View) error {
_, err := g.SetViewOnBottom("credentials") _, _ = g.SetViewOnBottom("credentials")
if err != nil {
return err
}
gui.credentials <- "" gui.credentials <- ""
return gui.returnFromContext() return gui.returnFromContext()

View File

@ -203,10 +203,7 @@ func (gui *Gui) layout(g *gocui.Gui) error {
if err.Error() != "unknown view" { if err.Error() != "unknown view" {
return err return err
} }
_, err := g.SetViewOnBottom("credentials") _, _ = g.SetViewOnBottom("credentials")
if err != nil {
return err
}
credentialsView.Title = gui.Tr.SLocalize("CredentialsUsername") credentialsView.Title = gui.Tr.SLocalize("CredentialsUsername")
credentialsView.FgColor = textColor credentialsView.FgColor = textColor
credentialsView.Editable = true credentialsView.Editable = true
@ -256,9 +253,7 @@ func (gui *Gui) layout(g *gocui.Gui) error {
appStatusView.BgColor = gocui.ColorDefault appStatusView.BgColor = gocui.ColorDefault
appStatusView.FgColor = gocui.ColorCyan appStatusView.FgColor = gocui.ColorCyan
appStatusView.Frame = false appStatusView.Frame = false
if _, err := g.SetViewOnBottom("appStatus"); err != nil { _, _ = g.SetViewOnBottom("appStatus")
return err
}
} }
informationView, err := setViewFromDimensions("information", "information", false) informationView, err := setViewFromDimensions("information", "information", false)

View File

@ -94,11 +94,7 @@ func (gui *Gui) createMenu(title string, items []*menuItem, createMenuOptions cr
return err return err
} }
if _, err := gui.g.View("menu"); err == nil { _, _ = gui.g.SetViewOnBottom("menu")
if _, err := gui.g.SetViewOnBottom("menu"); err != nil {
return err
}
}
return gui.returnFromContext() return gui.returnFromContext()
} }