I would like to clear top of screen from within my app (same as Ctrl+L in bash).
It seems I need to print "\033[H\033[2J" (for nix) and initiate full redraw. I see internal renderer.repaint is only initiated from WindowSizeMsg:
case "ctrl+l":
fmt.Print("\033[H\033[2J") // only nix
w, h, _ := term.GetSize(0) // wouldnt work if out is set
return m, func() tea.Msg { // hack to trigger redraw
return tea.WindowSizeMsg{Width: w, Height: h}
}
}
Is there an easier way to do this?
Would be nice to have built-in tea.ClearScreen cmd or at least some way to trigger full redraw so solution is less hacky and cross-platform.

I would like to clear top of screen from within my app (same as Ctrl+L in bash).
It seems I need to print "\033[H\033[2J" (for nix) and initiate full redraw. I see internal
renderer.repaintis only initiated fromWindowSizeMsg:Is there an easier way to do this?
Would be nice to have built-in
tea.ClearScreencmd or at least some way to trigger full redraw so solution is less hacky and cross-platform.