From 4f0393f97b06e4586c74d18b260f67c472c06119 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Fri, 8 May 2026 22:37:00 +0200 Subject: [PATCH] Fix visual glitch with status bar spinner at very slow spinner rates With a very slow spinner rate (seconds), you can see that at the beginning of an operation the bottom line leaves a gap for where the status will go, but the status (and spinner) is only drawn the first time the spinner ticks. The reason is that layout looks at GetStatusString to decide how much room to leave, rather than at the actual content of the AppStatus view; the view content is only set by renderAppStatus the first time the spinner ticks. Fix this by making layout look at the actual content of the view so that the layout is in sync with what is drawn. This also avoids flicker if an operation is so fast that it finishes before the spinner ticks for the first time, especially for users who set gui.showBottomLine to false. --- pkg/gui/layout.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/gui/layout.go b/pkg/gui/layout.go index 21d83ca04..dacd93f68 100644 --- a/pkg/gui/layout.go +++ b/pkg/gui/layout.go @@ -5,6 +5,7 @@ import ( "github.com/jesseduffield/lazygit/pkg/gocui" "github.com/jesseduffield/lazygit/pkg/gui/types" + "github.com/jesseduffield/lazygit/pkg/utils" "github.com/samber/lo" ) @@ -23,7 +24,11 @@ func (gui *Gui) layout(g *gocui.Gui) error { informationStr := gui.informationStr() - appStatus := gui.helpers.AppStatus.GetStatusString() + var appStatus string + appStatusView, err := g.View("appStatus") + if err == nil { + appStatus = utils.Decolorise(appStatusView.Buffer()) + } viewDimensions := gui.getWindowDimensions(informationStr, appStatus)