diff --git a/src/tui/light_unix.go b/src/tui/light_unix.go index 06099d2..c2d5612 100644 --- a/src/tui/light_unix.go +++ b/src/tui/light_unix.go @@ -33,15 +33,9 @@ func (r *LightRenderer) fd() int { return int(r.ttyin.Fd()) } -func (r *LightRenderer) initPlatform() error { - fd := r.fd() - origState, err := term.GetState(fd) - if err != nil { - return err - } - r.origState = origState - term.MakeRaw(fd) - return nil +func (r *LightRenderer) initPlatform() (err error) { + r.origState, err = term.MakeRaw(r.fd()) + return err } func (r *LightRenderer) closePlatform() {