diff options
Diffstat (limited to 'vendor/github.com/gdamore/tcell/v2/nonblock_unix.go')
-rw-r--r-- | vendor/github.com/gdamore/tcell/v2/nonblock_unix.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vendor/github.com/gdamore/tcell/v2/nonblock_unix.go b/vendor/github.com/gdamore/tcell/v2/nonblock_unix.go index 768128d7a..fe31844cf 100644 --- a/vendor/github.com/gdamore/tcell/v2/nonblock_unix.go +++ b/vendor/github.com/gdamore/tcell/v2/nonblock_unix.go @@ -24,6 +24,7 @@ import ( // tcSetBufParams is used by the tty driver on UNIX systems to configure the // buffering parameters (minimum character count and minimum wait time in msec.) +// This also waits for output to drain first. func tcSetBufParams(fd int, vMin uint8, vTime uint8) error { _ = syscall.SetNonblock(fd, true) tio, err := unix.IoctlGetTermios(fd, unix.TCGETS) @@ -32,7 +33,7 @@ func tcSetBufParams(fd int, vMin uint8, vTime uint8) error { } tio.Cc[unix.VMIN] = vMin tio.Cc[unix.VTIME] = vTime - if err = unix.IoctlSetTermios(fd, unix.TCSETS, tio); err != nil { + if err = unix.IoctlSetTermios(fd, unix.TCSETSW, tio); err != nil { return err } return nil |