chore: Rename Timeout Option

This commit is contained in:
Dieter Eickstaedt 2023-01-19 19:18:25 +01:00
parent 36c5ba5f1e
commit f296524989
2 changed files with 3 additions and 3 deletions

View file

@ -106,8 +106,8 @@ func (o Options) Run() error {
itemStyle: o.ItemStyle.ToLipgloss(), itemStyle: o.ItemStyle.ToLipgloss(),
selectedItemStyle: o.SelectedItemStyle.ToLipgloss(), selectedItemStyle: o.SelectedItemStyle.ToLipgloss(),
numSelected: currentSelected, numSelected: currentSelected,
hasTimeout: o.TimeoutOptions.HasTimeout(), hasTimeout: o.Timeout > 0,
timeout: o.TimeoutOptions.Timeout, timeout: o.Timeout,
}, tea.WithOutput(os.Stderr)).Run() }, tea.WithOutput(os.Stderr)).Run()
if err != nil { if err != nil {

View file

@ -36,7 +36,7 @@ func (o Options) Run() error {
lineNumberStyle: o.LineNumberStyle.ToLipgloss(), lineNumberStyle: o.LineNumberStyle.ToLipgloss(),
softWrap: o.SoftWrap, softWrap: o.SoftWrap,
timeout: o.Timeout, timeout: o.Timeout,
hasTimeout: o.HasTimeout(), hasTimeout: o.Timeout > 0,
} }
_, err := tea.NewProgram(model, tea.WithAltScreen()).Run() _, err := tea.NewProgram(model, tea.WithAltScreen()).Run()
if err != nil { if err != nil {