mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
Bump gocui and adapt lazygit code
Adaptions are for this gocui commit: Cleanup: remove Is* error functions - Use errors.Is instead of quality comparisons. This is better because it matches wrapped errors as well, which we will need later in this branch. - Inline the errors.Is calls at the call sites. This is idiomatic go, we don't need helper functions for this. See https://go.dev/blog/go1.13-errors for more about this.
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
package gui
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/jesseduffield/gocui"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||
"github.com/samber/lo"
|
||||
@ -121,7 +123,7 @@ func (gui *Gui) layout(g *gocui.Gui) error {
|
||||
}
|
||||
|
||||
_, err := setViewFromDimensions(context)
|
||||
if err != nil && !gocui.IsUnknownView(err) {
|
||||
if err != nil && !errors.Is(err, gocui.ErrUnknownView) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
@ -134,7 +136,7 @@ func (gui *Gui) layout(g *gocui.Gui) error {
|
||||
|
||||
for _, context := range gui.transientContexts() {
|
||||
view, err := gui.g.View(context.GetViewName())
|
||||
if err != nil && !gocui.IsUnknownView(err) {
|
||||
if err != nil && !errors.Is(err, gocui.ErrUnknownView) {
|
||||
return err
|
||||
}
|
||||
view.Visible = gui.helpers.Window.GetViewNameForWindow(context.GetWindowName()) == context.GetViewName()
|
||||
|
Reference in New Issue
Block a user