summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/gdamore/tcell/v2/console_win.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/gdamore/tcell/v2/console_win.go')
-rw-r--r--vendor/github.com/gdamore/tcell/v2/console_win.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/vendor/github.com/gdamore/tcell/v2/console_win.go b/vendor/github.com/gdamore/tcell/v2/console_win.go
index 7c5716039..a901a1255 100644
--- a/vendor/github.com/gdamore/tcell/v2/console_win.go
+++ b/vendor/github.com/gdamore/tcell/v2/console_win.go
@@ -343,6 +343,26 @@ func (s *cScreen) PostEvent(ev Event) error {
}
}
+func (s *cScreen) ChannelEvents(ch chan<- Event, quit <-chan struct{}) {
+ defer close(ch)
+ for {
+ select {
+ case <-quit:
+ return
+ case <-s.stopQ:
+ return
+ case ev := <-s.evch:
+ select {
+ case <-quit:
+ return
+ case <-s.stopQ:
+ return
+ case ch <- ev:
+ }
+ }
+ }
+}
+
func (s *cScreen) PollEvent() Event {
select {
case <-s.stopQ: