mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 02:59:09 -07:00
Read input regardless of whether or not it's a TTY
This commit also contains some refactors: * Refactor away inputStatus type * Refactor away program.inputIsTTY member * Simplify how we setup and restore input when it's a TTY
This commit is contained in:
@@ -47,6 +47,7 @@ func (p *Program) restoreInput() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Open the Windows equivalent of a TTY.
|
||||
func openInputTTY() (*os.File, error) {
|
||||
f, err := os.OpenFile("CONIN$", os.O_RDWR, 0644)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user