mirror of https://github.com/gdamore/tcell.git
parent
4e564d2402
commit
f057f0a857
|
@ -1547,7 +1547,12 @@ func (t *tScreen) inputLoop(stopQ chan struct{}) {
|
|||
switch e {
|
||||
case nil:
|
||||
default:
|
||||
_ = t.PostEvent(NewEventError(e))
|
||||
t.Lock()
|
||||
running := t.running
|
||||
t.Unlock()
|
||||
if running {
|
||||
_ = t.PostEvent(NewEventError(e))
|
||||
}
|
||||
return
|
||||
}
|
||||
if n > 0 {
|
||||
|
|
|
@ -72,7 +72,7 @@ func (tty *devTty) Start() error {
|
|||
if tty.f, err = os.OpenFile(tty.dev, os.O_RDWR, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
tty.fd = int(tty.of.Fd())
|
||||
tty.fd = int(tty.f.Fd())
|
||||
|
||||
if !term.IsTerminal(tty.fd) {
|
||||
return errors.New("device is not a terminal")
|
||||
|
|
Loading…
Reference in New Issue