Skip to content

Commit 046a4d3

Browse files
authored
fix: use 0 as default width (#634)
* fix: use 0 as default width Signed-off-by: Carlos Alexandro Becker <[email protected]> * fix: filter width --------- Signed-off-by: Carlos Alexandro Becker <[email protected]>
1 parent 8422c49 commit 046a4d3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

filter/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type Options struct {
2929
Prompt string `help:"Prompt to display" default:"> " env:"GUM_FILTER_PROMPT"`
3030
PromptStyle style.Styles `embed:"" prefix:"prompt." set:"defaultForeground=240" envprefix:"GUM_FILTER_PROMPT_"`
3131
PlaceholderStyle style.Styles `embed:"" prefix:"placeholder." set:"defaultForeground=240" envprefix:"GUM_FILTER_PLACEHOLDER_"`
32-
Width int `help:"Input width" default:"20" env:"GUM_FILTER_WIDTH"`
32+
Width int `help:"Input width" default:"0" env:"GUM_FILTER_WIDTH"`
3333
Height int `help:"Input height" default:"0" env:"GUM_FILTER_HEIGHT"`
3434
Value string `help:"Initial filter value" default:"" env:"GUM_FILTER_VALUE"`
3535
Reverse bool `help:"Display from the bottom of the screen" env:"GUM_FILTER_REVERSE"`

input/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type Options struct {
1616
CursorMode string `prefix:"cursor." name:"mode" help:"Cursor mode" default:"blink" enum:"blink,hide,static" env:"GUM_INPUT_CURSOR_MODE"`
1717
Value string `help:"Initial value (can also be passed via stdin)" default:""`
1818
CharLimit int `help:"Maximum value length (0 for no limit)" default:"400"`
19-
Width int `help:"Input width (0 for terminal width)" default:"40" env:"GUM_INPUT_WIDTH"`
19+
Width int `help:"Input width (0 for terminal width)" default:"0" env:"GUM_INPUT_WIDTH"`
2020
Password bool `help:"Mask input characters" default:"false"`
2121
ShowHelp bool `help:"Show help keybinds" default:"true" negatable:"true" env:"GUM_INPUT_SHOW_HELP"`
2222
Header string `help:"Header value" default:"" env:"GUM_INPUT_HEADER"`

write/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import "github.com/charmbracelet/gum/style"
44

55
// Options are the customization options for the textarea.
66
type Options struct {
7-
Width int `help:"Text area width (0 for terminal width)" default:"50" env:"GUM_WRITE_WIDTH"`
7+
Width int `help:"Text area width (0 for terminal width)" default:"0" env:"GUM_WRITE_WIDTH"`
88
Height int `help:"Text area height" default:"5" env:"GUM_WRITE_HEIGHT"`
99
Header string `help:"Header value" default:"" env:"GUM_WRITE_HEADER"`
1010
Placeholder string `help:"Placeholder value" default:"Write something..." env:"GUM_WRITE_PLACEHOLDER"`

0 commit comments

Comments
 (0)