diff --git a/choose/command.go b/choose/command.go index 5f58aae..ca39855 100644 --- a/choose/command.go +++ b/choose/command.go @@ -106,7 +106,7 @@ func (o Options) Run() error { itemStyle: o.ItemStyle.ToLipgloss(), selectedItemStyle: o.SelectedItemStyle.ToLipgloss(), numSelected: currentSelected, - }, tea.WithOutput(os.Stderr)).StartReturningModel() + }, tea.WithOutput(os.Stderr)).Run() if err != nil { return fmt.Errorf("failed to start tea program: %w", err) diff --git a/confirm/command.go b/confirm/command.go index f26e52a..ef8cf6e 100644 --- a/confirm/command.go +++ b/confirm/command.go @@ -23,7 +23,7 @@ func (o Options) Run() error { selectedStyle: o.SelectedStyle.ToLipgloss(), unselectedStyle: o.UnselectedStyle.ToLipgloss(), promptStyle: o.PromptStyle.ToLipgloss(), - }, tea.WithOutput(os.Stderr)).StartReturningModel() + }, tea.WithOutput(os.Stderr)).Run() if err != nil { return fmt.Errorf("unable to run confirm: %w", err) diff --git a/file/command.go b/file/command.go index 16e49b8..d9235b7 100644 --- a/file/command.go +++ b/file/command.go @@ -43,7 +43,7 @@ func (o Options) Run() error { fileSizeStyle: o.FileSizeStyle.ToLipgloss().Inline(true), } - tm, err := tea.NewProgram(&m, tea.WithOutput(os.Stderr)).StartReturningModel() + tm, err := tea.NewProgram(&m, tea.WithOutput(os.Stderr)).Run() if err != nil { return fmt.Errorf("unable to pick selection: %w", err) } diff --git a/filter/command.go b/filter/command.go index df030c9..3596cc2 100644 --- a/filter/command.go +++ b/filter/command.go @@ -82,7 +82,7 @@ func (o Options) Run() error { fuzzy: o.Fuzzy, }, options...) - tm, err := p.StartReturningModel() + tm, err := p.Run() if err != nil { return fmt.Errorf("unable to run filter: %w", err) } diff --git a/input/command.go b/input/command.go index 5cf8319..9efde06 100644 --- a/input/command.go +++ b/input/command.go @@ -40,7 +40,7 @@ func (o Options) Run() error { textinput: i, aborted: false, }, tea.WithOutput(os.Stderr)) - tm, err := p.StartReturningModel() + tm, err := p.Run() if err != nil { return fmt.Errorf("failed to run input: %w", err) } diff --git a/spin/command.go b/spin/command.go index 351497a..46ca5d5 100644 --- a/spin/command.go +++ b/spin/command.go @@ -25,7 +25,7 @@ func (o Options) Run() error { align: o.Align, } p := tea.NewProgram(m, tea.WithOutput(os.Stderr)) - mm, err := p.StartReturningModel() + mm, err := p.Run() m = mm.(model) if err != nil { diff --git a/table/command.go b/table/command.go index 084c734..1b90a70 100644 --- a/table/command.go +++ b/table/command.go @@ -91,7 +91,7 @@ func (o Options) Run() error { table.WithStyles(styles), ) - tm, err := tea.NewProgram(model{table: table}, tea.WithOutput(os.Stderr)).StartReturningModel() + tm, err := tea.NewProgram(model{table: table}, tea.WithOutput(os.Stderr)).Run() if err != nil { return fmt.Errorf("failed to start tea program: %w", err) diff --git a/write/command.go b/write/command.go index d91a71a..c45118c 100644 --- a/write/command.go +++ b/write/command.go @@ -52,7 +52,7 @@ func (o Options) Run() error { header: o.Header, headerStyle: o.HeaderStyle.ToLipgloss(), }, tea.WithOutput(os.Stderr)) - tm, err := p.StartReturningModel() + tm, err := p.Run() if err != nil { return fmt.Errorf("failed to run write: %w", err) }