diff options
| author | ewy <ewy0@protonmail.com> | 2026-04-17 00:57:22 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-04-17 00:57:22 +0200 |
| commit | d813995af4ad44c47f5c3f1f4d38183776fb975f (patch) | |
| tree | f594da2c6131051bbf267db7dad2b0d28e399cd2 /menu | |
| parent | 6d77bb49e6a92c38caa99627e33cfd2a600092ac (diff) | |
enable altscreen by default and add flag to disable
Diffstat (limited to 'menu')
| -rw-r--r-- | menu/menu.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/menu/menu.go b/menu/menu.go index 97b4078..fdb1c6b 100644 --- a/menu/menu.go +++ b/menu/menu.go @@ -3,6 +3,7 @@ package menu import ( "errors" tea "github.com/charmbracelet/bubbletea" + "pik/flags" "pik/model" "pik/spool" ) @@ -15,7 +16,11 @@ func Show(st *model.State, hydrators []model.Modder) (*model.HydratedSource, mod return nil, nil, NoSourcesIndexedError } md := NewModel(st, hydrators) - program := tea.NewProgram(md) + var opts []tea.ProgramOption + if !*flags.Inline { + opts = append(opts, tea.WithAltScreen()) + } + program := tea.NewProgram(md, opts...) resultModel, err := program.Run() if err != nil { return nil, nil, err |
