1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2026-06-20 01:19:23 +02:00

appease linter

This commit is contained in:
Jesse Duffield
2022-12-30 12:07:34 +11:00
parent af5b3be286
commit 1da0427e3a
+4 -9
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 // moves given context's view to the top of the window
// true if the view was not already on top. func (gui *Gui) moveToTopOfWindow(context types.Context) {
func (gui *Gui) moveToTopOfWindow(context types.Context) bool {
view := context.GetView() view := context.GetView()
if view == nil { if view == nil {
return false return
} }
window := context.GetWindowName() window := context.GetWindowName()
topView := gui.topViewInWindow(window) topView := gui.topViewInWindow(window)
if view.Name() == topView.Name() { if view.Name() != topView.Name() {
return false
} else {
if err := gui.g.SetViewOnTopOf(view.Name(), topView.Name()); err != nil { if err := gui.g.SetViewOnTopOf(view.Name(), topView.Name()); err != nil {
gui.Log.Error(err) gui.Log.Error(err)
} }
return true
} }
} }