Skip to content

Commit

Permalink
fixes #580 tcell custom tty on Windows will not work
Browse files Browse the repository at this point in the history
Applications will need to supply a working TTY of course.
  • Loading branch information
gdamore committed Dec 30, 2022
1 parent 2f889d7 commit dc01b79
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tscreen_stub.go
@@ -1,7 +1,7 @@
//go:build js || plan9 || windows
// +build js plan9 windows

// Copyright 2021 The TCell Authors
// Copyright 2022 The TCell Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use file except in compliance with the License.
Expand All @@ -22,5 +22,11 @@ package tcell
// that we can obtain with the console API present on Windows.

func (t *tScreen) initialize() error {
return ErrNoScreen
if t.tty == nil {
return ErrNoScreen
}
// If a tty was supplied (custom), it should work.
// Custom screen implementations will need to provide a TTY
// implementation that we can use.
return nil
}

0 comments on commit dc01b79

Please sign in to comment.