1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-26 09:00:57 +02:00

only refresh branches panel on focus lost when in the local-branches context

This commit is contained in:
Jesse Duffield 2019-11-17 09:42:17 +11:00
parent 986abc1e45
commit 6bd0979b4a

View File

@ -314,11 +314,13 @@ func (gui *Gui) onFocusLost(v *gocui.View, newView *gocui.View) error {
}
switch v.Name() {
case "branches":
if v.Context == "local-branches" {
// This stops the branches panel from showing the upstream/downstream changes to the selected branch, when it loses focus
// inside renderListPanel it checks to see if the panel has focus
if err := gui.renderListPanel(gui.getBranchesView(), gui.State.Branches); err != nil {
return err
}
}
case "main":
// if we have lost focus to a first-class panel, we need to do some cleanup
if err := gui.changeMainViewsContext("normal"); err != nil {