diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-16 17:29:06 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | c9ae54a8c8669483f8fbbb99ce4b139e204daa39 (patch) | |
tree | 0a016cb4c5123779b858ec253f2515221ad81069 /pkg/gui/context.go | |
parent | 6fb83b740b9b3030d6b6e6ed09f895a7c6a4839d (diff) |
remove previous view
Diffstat (limited to 'pkg/gui/context.go')
-rw-r--r-- | pkg/gui/context.go | 4 |
1 files changed, 2 insertions, 2 deletions
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 |