@ 261105.1

260402.12 · bea6721549ceb25695fc81f375aae2368517c38f

fix(tty): flush input before start (fixes #1045)

reading declarations

Changes to tty/stdin_unix.go. All files

tty/stdin_unix.go

@@ -71,6 +71,10 @@ func (tty *stdIoTty) Start() error { 	if err != nil { 		return err 	}+	if err = tcFlushInput(tty.fd); err != nil {+		_ = term.Restore(tty.fd, saved)+		return err+	} 	tty.saved = saved 	tty.started = true