summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/tasksamurai/main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/tasksamurai/main.go b/cmd/tasksamurai/main.go
index 65358e1..bd3cd24 100644
--- a/cmd/tasksamurai/main.go
+++ b/cmd/tasksamurai/main.go
@@ -27,7 +27,11 @@ func main() {
os.Exit(1)
}
- p := tea.NewProgram(&m)
+ // Clear the screen before starting the TUI to avoid leaving any
+ // previous command line artefacts behind.
+ fmt.Print("\033[H\033[2J")
+
+ p := tea.NewProgram(&m, tea.WithAltScreen())
if _, err := p.Run(); err != nil {
fmt.Fprintln(os.Stderr, "error running ui:", err)
os.Exit(1)