You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
I'm the developer of the popular github.com/gdamore/tcell package.
I'm skipping the rest of this questionaire as I think it's not terribly relevant to this feature request.
Essentially, I'd like golang.org/x/term to expose a method to flush I/O on the tty. This would permit us to ensure that we can pause the text UI, and not wind up sucking in a bunch of I/O when restoring back to raw mode.
Alternatively, having a version of term.MakeRaw (and probably also term.Restore) that let me specify TCSFLUSH behavior would also work.
The text was updated successfully, but these errors were encountered:
seankhliao
changed the title
golang/x/term desire tcflush
proposal: x/term: expose tcflush functionality
Jan 24, 2021
An alternative idea would be to create either an extended version of MakeRaw (say MakeRawExt()) that takes an "op" operation argument with one of the value Flush, Drain, or Now. This could also be added as optional argument to MakeRaw via an ...Options kind of varargs.
To be honest I think "tcflush" (call it TcFlush I guess) is the most flexible and powerful. I can then call that right before the other options, and you could support both flushing and draining on either input or output.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputI'm the developer of the popular github.com/gdamore/tcell package.
I'm skipping the rest of this questionaire as I think it's not terribly relevant to this feature request.
Essentially, I'd like golang.org/x/term to expose a method to flush I/O on the tty. This would permit us to ensure that we can pause the text UI, and not wind up sucking in a bunch of I/O when restoring back to raw mode.
Alternatively, having a version of term.MakeRaw (and probably also term.Restore) that let me specify TCSFLUSH behavior would also work.
The text was updated successfully, but these errors were encountered: