From f296524989390748b2a372ae00737801b0fa8e82 Mon Sep 17 00:00:00 2001 From: Dieter Eickstaedt Date: Thu, 19 Jan 2023 19:18:25 +0100 Subject: [PATCH] chore: Rename Timeout Option --- choose/command.go | 4 ++-- pager/command.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/choose/command.go b/choose/command.go index a0014ad..8c7ba7c 100644 --- a/choose/command.go +++ b/choose/command.go @@ -106,8 +106,8 @@ func (o Options) Run() error { itemStyle: o.ItemStyle.ToLipgloss(), selectedItemStyle: o.SelectedItemStyle.ToLipgloss(), numSelected: currentSelected, - hasTimeout: o.TimeoutOptions.HasTimeout(), - timeout: o.TimeoutOptions.Timeout, + hasTimeout: o.Timeout > 0, + timeout: o.Timeout, }, tea.WithOutput(os.Stderr)).Run() if err != nil { diff --git a/pager/command.go b/pager/command.go index f7fa23a..4522d04 100644 --- a/pager/command.go +++ b/pager/command.go @@ -36,7 +36,7 @@ func (o Options) Run() error { lineNumberStyle: o.LineNumberStyle.ToLipgloss(), softWrap: o.SoftWrap, timeout: o.Timeout, - hasTimeout: o.HasTimeout(), + hasTimeout: o.Timeout > 0, } _, err := tea.NewProgram(model, tea.WithAltScreen()).Run() if err != nil {