diff --git a/tty.go b/tty.go index 10d69d0..c72370f 100644 --- a/tty.go +++ b/tty.go @@ -20,7 +20,6 @@ func (p *Program) initTerminal() error { } if p.outputIsTTY { - enableAnsiColors(p.output) hideCursor(p.output) } diff --git a/tty_unix.go b/tty_unix.go index d34c44d..12f88ac 100644 --- a/tty_unix.go +++ b/tty_unix.go @@ -3,7 +3,6 @@ package tea import ( - "io" "os" "github.com/containerd/console" @@ -40,7 +39,3 @@ func openInputTTY() (*os.File, error) { } return f, nil } - -// enableAnsiColors is only needed for Windows, so for other systems this is -// a no-op. -func enableAnsiColors(_ io.Writer) {} diff --git a/tty_windows.go b/tty_windows.go index c9d43cf..7f1ce23 100644 --- a/tty_windows.go +++ b/tty_windows.go @@ -34,6 +34,8 @@ func (p *Program) initInput() error { c := console.Current() p.console = c + enableAnsiColors(p.output) + return nil }