Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultRenderCtx() gansi.RenderContext
- func DefaultStyles() gansi.StyleConfig
- func Glamourize(w int, md string) (string, error)
- func Max(a, b int) int
- func NewRenderCtx(worldwrap int) gansi.RenderContext
- func TruncateString(s string, max int, tail string) string
- type BubbleHelper
- type Commit
- type Commits
- type ErrMsg
- type HelpEntry
- type Repo
Constants ¶
View Source
const ( GlamourMaxWidth = 120 RepoNameMaxWidth = 32 MaxDiffLines = 1000 MaxDiffFiles = 100 MaxPatchWait = time.Second * 3 )
Variables ¶
View Source
var ( PrevPage = key.NewBinding( key.WithKeys("pgup", "b", "u"), key.WithHelp("pgup", "prev page"), ) NextPage = key.NewBinding( key.WithKeys("pgdown", "f", "d"), key.WithHelp("pgdn", "next page"), ) )
View Source
var ( ErrDiffTooLong = errors.New("diff is too long") ErrDiffFilesTooLong = errors.New("diff files are too long") ErrBinaryFile = errors.New("binary file") ErrFileTooLarge = errors.New("file is too large") ErrInvalidFile = errors.New("invalid file") )
View Source
var ( RenderCtx = DefaultRenderCtx() Styles = DefaultStyles() )
Functions ¶
func DefaultRenderCtx ¶
func DefaultRenderCtx() gansi.RenderContext
func DefaultStyles ¶
func DefaultStyles() gansi.StyleConfig
func NewRenderCtx ¶
func NewRenderCtx(worldwrap int) gansi.RenderContext
Types ¶
type BubbleHelper ¶
type BubbleHelper interface {
Help() []HelpEntry
}
Click to show internal directories.
Click to hide internal directories.