mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-15 14:03:06 +02:00
only refresh branches panel on focus lost when in the local-branches context
This commit is contained in:
parent
986abc1e45
commit
6bd0979b4a
@ -314,11 +314,13 @@ func (gui *Gui) onFocusLost(v *gocui.View, newView *gocui.View) error {
|
|||||||
}
|
}
|
||||||
switch v.Name() {
|
switch v.Name() {
|
||||||
case "branches":
|
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
|
// 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
|
// inside renderListPanel it checks to see if the panel has focus
|
||||||
if err := gui.renderListPanel(gui.getBranchesView(), gui.State.Branches); err != nil {
|
if err := gui.renderListPanel(gui.getBranchesView(), gui.State.Branches); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
case "main":
|
case "main":
|
||||||
// if we have lost focus to a first-class panel, we need to do some cleanup
|
// if we have lost focus to a first-class panel, we need to do some cleanup
|
||||||
if err := gui.changeMainViewsContext("normal"); err != nil {
|
if err := gui.changeMainViewsContext("normal"); err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user