summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/gdamore/tcell/v2/tscreen.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/gdamore/tcell/v2/tscreen.go')
-rw-r--r--vendor/github.com/gdamore/tcell/v2/tscreen.go22
1 files changed, 21 insertions, 1 deletions
diff --git a/vendor/github.com/gdamore/tcell/v2/tscreen.go b/vendor/github.com/gdamore/tcell/v2/tscreen.go
index 49aacf14c..ebd61a258 100644
--- a/vendor/github.com/gdamore/tcell/v2/tscreen.go
+++ b/vendor/github.com/gdamore/tcell/v2/tscreen.go
@@ -638,7 +638,7 @@ func (t *tScreen) drawCell(x, y int) int {
t.TPuts(ti.TGoto(x-1, y))
t.TPuts(ti.InsertChar)
t.cy = y
- t.cx = x-1
+ t.cx = x - 1
t.cells.SetDirty(x-1, y, true)
_ = t.drawCell(x-1, y)
t.TPuts(t.ti.TGoto(0, 0))
@@ -941,6 +941,26 @@ func (t *tScreen) nColors() int {
return t.ti.Colors
}
+func (t *tScreen) ChannelEvents(ch chan<- Event, quit <-chan struct{}) {
+ defer close(ch)
+ for {
+ select {
+ case <-quit:
+ return
+ case <-t.quit:
+ return
+ case ev := <-t.evch:
+ select {
+ case <-quit:
+ return
+ case <-t.quit:
+ return
+ case ch <- ev:
+ }
+ }
+ }
+}
+
func (t *tScreen) PollEvent() Event {
select {
case <-t.quit: