Skip to content
Myr

fix(write): max height, max chars (#753)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Carlos Alexandro Becker · committed by GitHub · parent 2939e51 · Browse files · 2 files+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−1 removed

  • other:+3 added−1 removed

2 files+3 added−1 removed

modified:write/command.go+1 added
26 unmodified lines
27 a.Prompt = o.Prompt28 a.Placeholder = o.Placeholder29 a.ShowLineNumbers = o.ShowLineNumbers30 a.CharLimit = o.CharLimit31 a.MaxHeight = o.MaxLines3233 style := textarea.Style{34 Base: o.BaseStyle.ToLipgloss(),35 Placeholder: o.PlaceholderStyle.ToLipgloss(),
43 unmodified lines
modified:write/options.go+2 added-1 removed
14 unmodified lines
15 Prompt string `help:"Prompt to display" default:"┃ " env:"GUM_WRITE_PROMPT"`16 ShowCursorLine bool `help:"Show cursor line" default:"false" env:"GUM_WRITE_SHOW_CURSOR_LINE"`17 ShowLineNumbers bool `help:"Show line numbers" default:"false" env:"GUM_WRITE_SHOW_LINE_NUMBERS"`18 Value string `help:"Initial value (can be passed via stdin)" default:"" env:"GUM_WRITE_VALUE"`19 CharLimit int `help:"Maximum value length (0 for no limit)" default:"400"`19 CharLimit int `help:"Maximum value length (0 for no limit)" default:"0"`20 MaxLines int `help:"Maximum number of lines (0 for no limit)" default:"0"`21 ShowHelp bool `help:"Show help key binds" negatable:"" default:"true" env:"GUM_WRITE_SHOW_HELP"`22 CursorMode string `prefix:"cursor." name:"mode" help:"Cursor mode" default:"blink" enum:"blink,hide,static" env:"GUM_WRITE_CURSOR_MODE"`23 Timeout time.Duration `help:"Timeout until choose returns selected element" default:"0s" env:"GUM_WRITE_TIMEOUT"`24
10 unmodified lines