appease linter

This commit is contained in:
Jesse Duffield
2022-12-30 12:07:34 +11:00
parent af5b3be286
commit 1da0427e3a

View File

@@ -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
}
}