mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-29 22:48:24 +02:00
Add automated demo recordings (#2853)
This commit is contained in:
@@ -96,7 +96,10 @@ func (self *RefreshHelper) Refresh(options types.RefreshOptions) error {
|
||||
|
||||
wg := sync.WaitGroup{}
|
||||
refresh := func(name string, f func()) {
|
||||
if options.Mode == types.ASYNC {
|
||||
// if we're in a demo we don't want any async refreshes because
|
||||
// everything happens fast and it's better to have everything update
|
||||
// in the one frame
|
||||
if !self.c.InDemo() && options.Mode == types.ASYNC {
|
||||
self.c.OnWorker(func(t gocui.Task) {
|
||||
f()
|
||||
})
|
||||
|
||||
@@ -201,12 +201,18 @@ func (self *WindowArrangementHelper) infoSectionChildren(informationStr string,
|
||||
appStatusBox.Weight = 1
|
||||
} else {
|
||||
optionsBox.Weight = 1
|
||||
appStatusBox.Size = runewidth.StringWidth(INFO_SECTION_PADDING) + runewidth.StringWidth(appStatus)
|
||||
if self.c.InDemo() {
|
||||
// app status appears very briefly in demos and dislodges the caption,
|
||||
// so better not to show it at all
|
||||
appStatusBox.Size = 0
|
||||
} else {
|
||||
appStatusBox.Size = runewidth.StringWidth(INFO_SECTION_PADDING) + runewidth.StringWidth(appStatus)
|
||||
}
|
||||
}
|
||||
|
||||
result := []*boxlayout.Box{appStatusBox, optionsBox}
|
||||
|
||||
if self.c.UserConfig.Gui.ShowBottomLine || self.modeHelper.IsAnyModeActive() {
|
||||
if (!self.c.InDemo() && self.c.UserConfig.Gui.ShowBottomLine) || self.modeHelper.IsAnyModeActive() {
|
||||
result = append(result, &boxlayout.Box{
|
||||
Window: "information",
|
||||
// unlike appStatus, informationStr has various colors so we need to decolorise before taking the length
|
||||
|
||||
Reference in New Issue
Block a user