260402.12 · bea6721549ceb25695fc81f375aae2368517c38f
fix(tty): flush input before start (fixes #1045)
reading declarations
Changes to tty/nonblock_unix.go. All files
@@ -39,3 +39,10 @@ func tcSetBufParams(fd int, vMin uint8, vTime uint8) error { } return nil }++// tcFlushInput discards any queued input before the caller starts reading from+// the tty. This avoids stale bytes, such as delayed mouse reports, from being+// delivered to the next foreground application.+func tcFlushInput(fd int) error {+ return unix.IoctlSetInt(fd, unix.TCFLSH, unix.TCIFLUSH)+}