From 1da0427e3aa8ce5e2794281cf15eee4c65a8375b Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Fri, 30 Dec 2022 12:07:34 +1100 Subject: [PATCH] appease linter --- pkg/gui/window.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/pkg/gui/window.go b/pkg/gui/window.go index 1d69c420c..c5355bcea 100644 --- a/pkg/gui/window.go +++ b/pkg/gui/window.go @@ -76,26 +76,21 @@ func (gui *Gui) resetWindowContext(c types.Context) { } } -// moves given context's view to the top of the window and returns -// true if the view was not already on top. -func (gui *Gui) moveToTopOfWindow(context types.Context) bool { +// moves given context's view to the top of the window +func (gui *Gui) moveToTopOfWindow(context types.Context) { view := context.GetView() if view == nil { - return false + return } window := context.GetWindowName() topView := gui.topViewInWindow(window) - if view.Name() == topView.Name() { - return false - } else { + if view.Name() != topView.Name() { if err := gui.g.SetViewOnTopOf(view.Name(), topView.Name()); err != nil { gui.Log.Error(err) } - - return true } }