diff --git a/pkg/gui/context.go b/pkg/gui/context.go index 85e653438..c44cc7fc1 100644 --- a/pkg/gui/context.go +++ b/pkg/gui/context.go @@ -349,7 +349,7 @@ func (gui *Gui) getFocusLayout() func(g *gocui.Gui) error { var previousView *gocui.View return func(g *gocui.Gui) error { newView := gui.g.CurrentView() - if err := gui.onFocusChange(); err != nil { + if err := gui.onViewFocusChange(); err != nil { return err } // for now we don't consider losing focus to a popup panel as actually losing focus @@ -367,7 +367,7 @@ func (gui *Gui) getFocusLayout() func(g *gocui.Gui) error { } } -func (gui *Gui) onFocusChange() error { +func (gui *Gui) onViewFocusChange() error { currentView := gui.g.CurrentView() for _, view := range gui.g.Views() { view.Highlight = view.Name() != "main" && view == currentView diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 0ddf4b2ce..9857beac6 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -217,7 +217,6 @@ type guiState struct { RemoteBranches []*commands.RemoteBranch Tags []*commands.Tag MenuItemCount int // can't store the actual list because it's of interface{} type - PreviousView string Updating bool Panels *panelStates MainContext string // used to keep the main and secondary views' contexts in sync @@ -260,7 +259,6 @@ func (gui *Gui) resetState() { gui.State = &guiState{ Files: make([]*commands.File, 0), - PreviousView: "files", Commits: make([]*commands.Commit, 0), FilteredReflogCommits: make([]*commands.Commit, 0), ReflogCommits: make([]*commands.Commit, 0),