1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

appease golangci

This commit is contained in:
Jesse Duffield
2019-03-02 13:22:02 +11:00
parent 4de31da4be
commit 1337f6e76a
6 changed files with 32 additions and 13 deletions

View File

@ -248,6 +248,15 @@ func (gui *Gui) onFocusLost(v *gocui.View) error {
if err := gui.renderListPanel(gui.getBranchesView(), gui.State.Branches); err != nil {
return err
}
} else if v.Name() == "main" {
// if we have lost focus to a popup panel, that's okay
if gui.popupPanelFocused() {
return nil
}
if err := gui.changeContext("main", "normal"); err != nil {
return err
}
}
gui.Log.Info(v.Name() + " focus lost")
return nil
@ -521,7 +530,7 @@ func (gui *Gui) renderGlobalOptions() error {
func (gui *Gui) goEvery(interval time.Duration, function func() error) {
go func() {
for range time.Tick(interval) {
function()
_ = function()
}
}()
}