mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Add demo test variant
We're piggybacking on our existing integration test framework to record demos that we can include in our docs
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/jesseduffield/gocui"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/style"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||
)
|
||||
@ -137,3 +138,22 @@ func (gui *Gui) handleCopySelectedSideContextItemToClipboard() error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (gui *Gui) setCaption(caption string) {
|
||||
gui.Views.Options.FgColor = gocui.ColorWhite
|
||||
gui.Views.Options.FgColor |= gocui.AttrBold
|
||||
gui.Views.Options.SetContent(captionPrefix + " " + style.FgCyan.SetBold().Sprint(caption))
|
||||
gui.c.Render()
|
||||
}
|
||||
|
||||
var captionPrefix = ""
|
||||
|
||||
func (gui *Gui) setCaptionPrefix(prefix string) {
|
||||
gui.Views.Options.FgColor = gocui.ColorWhite
|
||||
gui.Views.Options.FgColor |= gocui.AttrBold
|
||||
|
||||
captionPrefix = prefix
|
||||
|
||||
gui.Views.Options.SetContent(prefix)
|
||||
gui.c.Render()
|
||||
}
|
||||
|
Reference in New Issue
Block a user