From 4d8f25e42b2900d4bb846b42a5a9aa8c031cb60e Mon Sep 17 00:00:00 2001 From: bunny winter Date: Tue, 11 Feb 2025 21:58:52 -0600 Subject: [PATCH] fix(launcher): use alt screen --- launcher/main.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/launcher/main.go b/launcher/main.go index 6b5416f..e58e947 100644 --- a/launcher/main.go +++ b/launcher/main.go @@ -97,7 +97,7 @@ func newProgramsKeyMap() *programsKeyMap { // ======================= // bubbletea model methods func (m model) Init() tea.Cmd { - return nil + return tea.EnterAltScreen } func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { @@ -314,14 +314,6 @@ func Run(cmd *cobra.Command, args []string) error { os.Exit(1) } - // ============ - // clear screen - - // TODO this feels hacky and should probably be replaced - execCmd := exec.Command("clear") - execCmd.Stdout = os.Stdout - execCmd.Run() - // ==================================== // execute chosen command if one is set if finalModel, ok := finalModel.(model); ok && finalModel.shouldExec != "" {