mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-06-20 01:19:23 +02:00
appease linter
This commit is contained in:
+4
-9
@@ -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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user