summaryrefslogtreecommitdiffstats
path: root/pkg/gui/gui.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r--pkg/gui/gui.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index 4cf435b8f..70c3c3f51 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -24,6 +24,7 @@ import (
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/config"
+ "github.com/jesseduffield/lazygit/pkg/gui/presentation"
"github.com/jesseduffield/lazygit/pkg/i18n"
"github.com/jesseduffield/lazygit/pkg/tasks"
"github.com/jesseduffield/lazygit/pkg/theme"
@@ -270,7 +271,7 @@ func NewGui(log *logrus.Entry, gitCommand *commands.GitCommand, oSCommand *comma
func (gui *Gui) nextScreenMode(g *gocui.Gui, v *gocui.View) error {
gui.State.ScreenMode = utils.NextIntInCycle([]int{SCREEN_NORMAL, SCREEN_HALF, SCREEN_FULL}, gui.State.ScreenMode)
// commits render differently depending on whether we're in fullscreen more or not
- if err := gui.renderBranchCommitsWithSelection(); err != nil {
+ if err := gui.refreshCommitsViewWithSelection(); err != nil {
return err
}
@@ -280,7 +281,7 @@ func (gui *Gui) nextScreenMode(g *gocui.Gui, v *gocui.View) error {
func (gui *Gui) prevScreenMode(g *gocui.Gui, v *gocui.View) error {
gui.State.ScreenMode = utils.PrevIntInCycle([]int{SCREEN_NORMAL, SCREEN_HALF, SCREEN_FULL}, gui.State.ScreenMode)
// commits render differently depending on whether we're in fullscreen more or not
- if err := gui.renderBranchCommitsWithSelection(); err != nil {
+ if err := gui.refreshCommitsViewWithSelection(); err != nil {
return err
}
@@ -382,10 +383,8 @@ func (gui *Gui) onFocusLost(v *gocui.View, newView *gocui.View) error {
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
- }
+ displayStrings := presentation.GetBranchListDisplayStrings(gui.State.Branches, false, -1)
+ gui.renderDisplayStrings(gui.getBranchesView(), displayStrings)
}
case "main":
// if we have lost focus to a first-class panel, we need to do some cleanup