diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-03-21 21:07:49 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-03-21 21:07:49 -0400 |
commit | d97cdde38dfaf8d7f63d5f86eb9eac4eab359dc4 (patch) | |
tree | 2b24c171826ae8fcb26a7d97d06391f0af9b3d1d /widgets/terminal.go | |
parent | 0b26241b42153e83eec9a0333d138f4972fd59ab (diff) | |
download | aerc-d97cdde38dfaf8d7f63d5f86eb9eac4eab359dc4.tar.gz |
Skip writes if term is closed
Diffstat (limited to 'widgets/terminal.go')
-rw-r--r-- | widgets/terminal.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/terminal.go b/widgets/terminal.go index d817023..5b0be1a 100644 --- a/widgets/terminal.go +++ b/widgets/terminal.go @@ -120,7 +120,7 @@ func NewTerminal(cmd *exec.Cmd) (*Terminal, error) { buf := make([]byte, 4096) for { n, err := term.pty.Read(buf) - if err != nil { + if err != nil || term.closed { // These are generally benine errors when the process exits term.Close(nil) return |