summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Bütow <1224732+snonux@users.noreply.github.com>2025-06-20 18:28:59 +0300
committerGitHub <noreply@github.com>2025-06-20 18:28:59 +0300
commit20417e3024916a23a0378f72c1336ccbb56f0bae (patch)
treef4e4410ab6f9ff4d3ce736119eb9c086a4bd9c81
parentcf2299f9d3a1d2095141d4c1b80b1e7632252ed0 (diff)
parenta9852f11afb3bd02d6b21a02c65b8b395cfdbe3e (diff)
Merge pull request #23 from snonux/codex/redraw-screen-on-tui-open
Improve screen clearing on TUI start
-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)